Skip to content

GWR Analysis

6 messages · Pinar Aslantas Bostan, Roger Bivand

#
On Fri, 11 Jun 2010, Pinar Aslantas Bostan wrote:

            
You need to provide the detailed output of traceback(), and probably also 
run gwr() under debug() to see whether this is a data problem or a code 
problem. Does gwr() work when predict=FALSE, and/or predict=TRUE, 
se.fit=FALSE? The error message is generated when the number of columns in 
the matrix of X variables is not the same in data and and fit.points. Are 
the variables in both cases stored in the same way? What do 
str(station.grid) and str(station) look like before conversion to SPDF and 
after? Is one variable a factor in one and numeric in the other? Running 
under debug() will let you check what x and predx look like.

If this sounds hard, consider putting your data on a website and posting 
the link.

Hope this helps,

Roger
station$V1 + station$V2, data=station, adapt=bw, 
fit.points = grid, predict=TRUE, se.fit=T)

  
    
#
On Fri, 11 Jun 2010, Pinar Aslantas Bostan wrote:

            
Please do try to read up on what is going on. Find out how variables may 
be treated as string not numeric on input, and converted into factors. Do 
report str() of the imported objects as I said last time. This will show 
if some numeric are really factors - this may happen for example if the 
locale thinks that ",", not "." is the decimal sign, or if there is any 
non-numeric character in a column. If need be put your data (or a subset 
with the same problem on a website and post the link. Please do try to use 
lm() and predict() on the lm output object to see whether the problem is 
reproduced there too.

Please also be aware that using GWR for prediction has no good basis 
anywhere for anything - and the standard errors should not be given any 
credibility. This is not what GWR is for at all.

Roger

  
    
3 days later
#
On Tue, 15 Jun 2010, Pinar Aslantas Bostan wrote:

            
No, this occurs when the representation is changed to grid, and where some 
complete columns or rows are absent. This can occur for good reason, say 
in an archipelago, but the warning is given in case the analyst made a 
mistake, and that absent grid rows or columns were not expected.

Roger