topic Re: Log transformation of variable "income" causes GWR to crap out? in Spatial Statistics Questions
https://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735516#M2313
<HTML><HEAD></HEAD><BODY><SPAN>I had the same problem: very nice OLS model, with five independent variable. VIF all below 2. Converted to logs and wouldn't run in ArcGIS as a GWR. I centred the variables (as advised above) and it works very well. Thanks for the advice. I would never have got there on my own! Stephen</SPAN></BODY></HTML>Thu, 10 Nov 2011 20:23:07 GMTStephenPeplow2011-11-10T20:23:07ZLog transformation of variable "income" causes GWR to crap out?
https://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735513#M2310
<HTML><HEAD></HEAD><BODY><SPAN>Working on specifying my GWR model and doing my OLS work found, not surprisingly, that "income", and other variables like "population density", and "call_rate" needed transformation. So I used a normal log transformation and computed new field values for each and created "log_income" and "log_pop_density" and "log_call_rate". Before, running the OLS, everything seemed fine. But now, when running GWR, the analysis craps out with the ole...</SPAN><BR /><BR /><SPAN>[INDENT]ERROR 040038: Results cannot be computed because of severe model design problems.</SPAN><BR /><SPAN>Failed to execute (GeographicallyWeightedRegression).</SPAN><BR /><SPAN>[/INDENT]</SPAN><BR /><BR /><SPAN>So I narrowed it down to the "log_income" and "log_pop_density" variables - whenever the "log_income" is included, either as independent or dependent variable, the model completely tanks. For the "log_pop_den" variable </SPAN><SPAN style="text-decoration:underline;">only when it's a dependent variable </SPAN><SPAN>does the model tank. Looking at the distribution graphically (attached) for income it seems OK. Perhaps this isn't the correct (best?) transformation though?</SPAN><BR /><BR /><SPAN>Methodologically I'm working on an city wide grid, measuring about 2000 x 2000 polygons high and wide, each measuring 250' x 250', where almost every one has data within it. I've set bandwidths to extremes, used minimum # of neighbors, AICc, etc. - every iteration possible - and can't seem to get it to fly. Clearly my "transformation" is the problem but not sure what that problem is.</SPAN><BR /><BR /><SPAN>Much thanks for anyone's eyes on this.</SPAN></BODY></HTML>Sat, 25 Jun 2011 05:55:50 GMThttps://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735513#M2310AndrewTimleck2011-06-25T05:55:50ZRe: Log transformation of variable "income" causes GWR to crap out?
https://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735514#M2311
<HTML><HEAD></HEAD><BODY><SPAN>Hey Andrew, </SPAN><BR /><BR /><SPAN>I'm sorry you're having trouble getting GWR to run for your analysis. Severe model design errors often indicate a problem with global or local multicollinearity. To determine where the problem is, run the model using OLS and examine the VIF value for each explanatory variable. If some of the VIF values are large (above 7.5, for example), global multicollinearity is preventing GWR from solving. More likely, however, local multicollinearity is the problem. Try creating a thematic map for each explanatory variable. If the map reveals spatial clustering of identical values, consider combining those variables with other explanatory variables to increase value variation. If, for example, you are modeling home values and have variables for both bedrooms and bathrooms, you may want to combine these to increase value variation or represent them as bathroom/bedroom square footage.</SPAN><BR /><BR /><SPAN>Another option is to try transforming it (although not in the traditional sense of logs or powers): create a new field, then calculate the values to be the value (in this case the log) minus the mean for all values in that field. This doesn�??t actually change anything (the impact on results), but for some reason we've found that GWR likes variables in that form�?� and this transformation will often �??fix�?� the problem.</SPAN><BR /><BR /><SPAN>Also, just a reminder to make sure that you find a properly specified OLS model before moving on to GWR. There is some great documentation about this, including this recent ArcUser article on </SPAN><A href="http://www.esri.com/news/arcuser/0111/findmodel.html">Finding a Meaningful Model</A><SPAN> and the training seminar on </SPAN><A href="http://training.esri.com/acb2000/showdetl.cfm?DID=6&Product_ID=942">Regression Analysis Basics</A><SPAN>.</SPAN></BODY></HTML>Tue, 26 Jul 2011 22:57:36 GMThttps://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735514#M2311LaurenRosenshein2011-07-26T22:57:36ZRe: Log transformation of variable "income" causes GWR to crap out?
https://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735515#M2312
<HTML><HEAD></HEAD><BODY><SPAN>Hi Ms. Rosenshein, </SPAN><BR /><BR /><SPAN>Thanks for the response, much appreciate the time looking at my problem. You wrote...</SPAN><BR /><BR /><BLOCKQUOTE class="jive-quote">Hey Andrew, <BR />To determine where the problem is, run the model using OLS and examine the VIF value for each explanatory variable. If some of the VIF values are large (above 7.5, for example), global multicollinearity is preventing GWR from solving.</BLOCKQUOTE><BR /><BR /><SPAN>Yup. Did this first. nothing above 1.99 for VIF. I had already dropped a number of variables because of high VIFs. But "Income" stands alone, as does "population density" - two of the variables I'm having the most issues with.</SPAN><BR /><BR /><BLOCKQUOTE class="jive-quote"><BR />More likely, however, local multicollinearity is the problem. Try creating a thematic map for each explanatory variable. If the map reveals spatial clustering of identical values, consider combining those variables with other explanatory variables to increase value variation. <BR /></BLOCKQUOTE><BR /><BR /><SPAN>Yes, did this too. And ran LISA and Moran's I measures for all variables to detect for spatial autocorrelation. I see the idea behind combining some variables but then the model loses specificity in explanatory power (and given the VIFs aren't indicating a model issue I'm stumped somewhat.) For example, in Baltimore City, the area in question, there is high local correlation of "percent black" and "percent living in poverty". However, clearly the two variables are separate "entities" and collapsing them loses far too much explanatory utility to do so. Again, it's not these variables that are causing the model to fail structurally I suspect...</SPAN><BR /><BR /><BLOCKQUOTE class="jive-quote"><BR />Another option is to try transforming it (although not in the traditional sense of logs or powers): create a new field, then calculate the values to be the value (in this case the log) minus the mean for all values in that field. This doesn�??t actually change anything (the impact on results), but for some reason we've found that GWR likes variables in that form�?� and this transformation will often �??fix�?� the problem.<BR /></BLOCKQUOTE><BR /><BR /><SPAN>I</SPAN><STRONG>'m thinking this might be the way to go.</STRONG><SPAN> There is something in the numerical distribution of the variable values that seems to be problematic and causes the equations to falter at the immediate, local, rendering of the GWR. Log transformations seem problematic when </SPAN><SPAN style="text-decoration:underline;">untransformed</SPAN><SPAN> values </SPAN><SPAN style="font-style:italic;">do</SPAN><SPAN> work and the transformed don't. I'll check that the transformation follows the assumptions of the variables in questions, though transforming income to a log value is pretty standard I thought? So it still makes me ask what about the combination of equation values could be causing it to fail? (in particular it's the open-ended (supposedly) distribution of "Income" and "population density" transformed to log values that appears the most problematic in the local GWR executions)</SPAN><BR /><BR /><BLOCKQUOTE class="jive-quote"><BR />Also, just a reminder to make sure that you find a properly specified OLS model before moving on to GWR. There is some great documentation about this, including this recent ArcUser article on <A href="http://www.esri.com/news/arcuser/0111/findmodel.html">Finding a Meaningful Model</A> and the training seminar on <A href="http://training.esri.com/acb2000/showdetl.cfm?DID=6&Product_ID=942">Regression Analysis Basics</A>.</BLOCKQUOTE><BR /><BR /><SPAN>Thanks for posting this stuff - I'd read the model specification stuff earlier, to be sure I was on the right track still, but the "Finding a Meaningful Model" piece will be good to check my model against core assumptions again (</SPAN><SPAN style="font-style:italic;">BTW, it's a nice, simple, elegant piece - well done and thanks for posting/sharing it)</SPAN><SPAN>. I've gone so far in my model estimations to use the spatial modeling tools for checking sills, nuggets and so on to get a properly determined spatial model, banding distances etc. And I also, earlier, went through and ran a global analysis for Pearsons correlations, running one variable against the next spatially, to determine if there are spurious relationships (mediating and moderating factors) that could be skewing variable values as well.</SPAN><BR /><BR /><SPAN>Thanks for the input and suggestions - will see where they take me. Clearly spatial analysis remains in the realm of "sausage making statistics" - not pretty to know what goes in but looks good on the other side, lol.</SPAN><BR /><BR /><SPAN>Best</SPAN><BR /><SPAN>Andrew</SPAN></BODY></HTML>Wed, 27 Jul 2011 04:13:15 GMThttps://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735515#M2312AndrewTimleck2011-07-27T04:13:15ZRe: Log transformation of variable "income" causes GWR to crap out?
https://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735516#M2313
<HTML><HEAD></HEAD><BODY><SPAN>I had the same problem: very nice OLS model, with five independent variable. VIF all below 2. Converted to logs and wouldn't run in ArcGIS as a GWR. I centred the variables (as advised above) and it works very well. Thanks for the advice. I would never have got there on my own! Stephen</SPAN></BODY></HTML>Thu, 10 Nov 2011 20:23:07 GMThttps://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735516#M2313StephenPeplow2011-11-10T20:23:07ZRe: Log transformation of variable "income" causes GWR to crap out?
https://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735517#M2314
<HTML><HEAD></HEAD><BODY><BLOCKQUOTE class="jive-quote">Hey Andrew, <BR /><BR />Another option is to try transforming it (although not in the traditional sense of logs or powers): create a new field, then calculate the values to be the value (in this case the log) minus the mean for all values in that field. This doesn�??t actually change anything (the impact on results), but for some reason we've found that GWR likes variables in that form�?� and this transformation will often �??fix�?� the problem.<BR /><BR /></BLOCKQUOTE><BR /><BR /><SPAN>This worked wonderfully! Thanks so much!!</SPAN></BODY></HTML>Sat, 28 Apr 2012 03:02:19 GMThttps://community.esri.com/t5/spatial-statistics-questions/log-transformation-of-variable-amp-quot-income-amp-quot-causes/m-p/735517#M2314AnnaFischer12012-04-28T03:02:19Z