Skip to content
Prev 24249 / 29559 Next

Error is spdep spautolm()

On Tue, 12 Apr 2016, Samar Deen wrote:

            
This is trivial, input weights must be of the same length as the number of 
observations.
[1] 1

... more below
(I have access to the data from an earlier offline exchange involving 
issues with missing data)

The points are (most likely) in geographical coordinates, so almost all 
of your attempts to create neighbour objects are wrong - all graph methods 
are only on the plane. Distances can be used when longlat=TRUE only.

Your use of scaled inverted spatial weights is contorted and the declared 
listw object style wrong, this ought to be sufficient:

gab.dist.sinv <- lapply(gab.dist, function(x) min(unlist(gab.dist))/x)

Much seems to have been copied from a script detailing analysis of the NC 
SIDS data set (the 30 mile threshold was used there).

It isn't obvious what you are trying to do.

Roger