[R] Error in qr.solve(crossprod(xsar), t(xsar)) when using SpatialFiltering
Aquarius
yiyiwang.ut at gmail.com
Sat Jun 25 03:28:32 CEST 2011
I am using the R function SpatialFiltering to my land value dataset.
I compute a 500 by 500 binary spatial weight matrix (W) based on the x and y
coordinates in my land value dataset. The nearest 6 neighbours were given a
value of 1. By construction Wii=0. So my weight matrix look like
0 ..1 0 0 ... 1 0
0......1.....0...
....0...1......
# of rows= 500. # of columns =500. Row sum =6 (because of nearest
neighbour=6)
Then I fed the data into the SpatialFiltering fxn:
tmp = mat2listw(wt);
results= SpatialFiltering(LandValue ~ 1+AI+Area_SF_08+Dist2CBD05, data=lu2,
nb=tmp$neighbours, style="W", ExactEV=TRUE, zero.policy=TRUE)
%%%%%%%%%%%%%%%%%%%
Then an error message occur:
Error in qr.solve(crossprod(xsar), t(xsar)) :
singular matrix 'a' in solve
Can someone help me out?
Thank you so much in advance!
Yiyi
--
View this message in context: http://r.789695.n4.nabble.com/Error-in-qr-solve-crossprod-xsar-t-xsar-when-using-SpatialFiltering-tp3623943p3623943.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list