Skip to content

empty neighbour sets and lm.morantest()

2 messages · Advait Godbole, Roger Bivand

#
On Thu, 26 May 2011, Advait Godbole wrote:

            
Well, working without complete cases is always very unsatisfactory. 
Consider subsetting everything (data and neighbour object) to remove 
incomplete cases first - the results will be the same anyway. The error 
messages are caused by the internal subsetting of the neighbour object 
creating observations with no neighbours. You can choose to pass 
zero.policy=TRUE in all functions using the neighbour object, or setting 
set.ZeroPolicyOption() globally. The error message does tell you what the 
problem is.
Wrong check: length(residuals(ols.allxform)) is not equal to 
length(vulcgrid.nb.dist.45km.gwt.w$neighbours) - that is, the object 
created in OpenGeoDa is not for the same objects as the lm model objects.

Roger