Skip to content

gwr.sel, missing values

2 messages · Sven Müller, Roger Bivand

#
Hi all,

I have the following problem with finding an adaptive kernel in GWR. I 
use R2.8.1. In my dataset I have a few variables with missing values. 
Now, I try to find a bandwith for an adaptive kernel using 'gwr.sel' and 
it gives the following error message:
Warning in w.i * weights: Length of the longer object is not a multiple 
of the shorter object
If I run 'gwr.sel' using variables without missing values everything is 
working fine. Just for the variables with missing values this error 
message occurs.
What is my fault?
Every hint is gratefully acknowledged.

Cheers

Sven
#
On Wed, 15 Apr 2009, Sven M?ller wrote:

            
Including missing values on the data points. Don't do it - you cannot fit 
the local regressions there, so they should be subsetted out first. Look 
at the output of lm() of the same model, with default na.action it will 
show that you have lost observations.

Roger