[R-sig-Geo] error in spautolm spdep and model selection?
Michael Denslow
mwdenslow at yahoo.com
Sat Jan 17 23:23:23 CET 2009
Dear r-sig-geo,
I am attempting to compare the results from an lm() regression with an appropriate spatial regression. I have run into a problem when using the spautolm function in spdep.
When I include a polynomial term in the model I get the following error message:
> SAR <- spautolm(log10ns2a ~ log10a2a + floras2a$Field.Year +
floras2a$mid.elev + I(floras2a$mid.elev^2),
listw = nb72km.w)
Error in solve.default(t(X) %*% as.matrix(IlW %*% X), tol = tol.solve) :
system is computationally singular: reciprocal condition number = 2.07505e-17
I am not sure how to interpret this. The function seems to work fine if I remove the polynomial term.
Perhaps to larger question is which is the appropriate SAR/CAR model to use for my data. I realize that this is not an R question but any help would be most appreciated! My data has some spatial autocorrelation in the predictor variables. The residuals of the lm() model are not autocorrelated. Also the elevation variable is strongly autocorrelated and directional in my data set. As I understand it this would rule out CAR as an option.
Thank you in advance for any help you can provide,
Michael
Michael Denslow
I.W. Carpenter Jr. Herbarium [BOON]
Appalachian State University
Boone, North Carolina U.S.A.
-- AND --
Communications Manager
Southeastern Regional Network of Expertise and Collections
sernec.org
More information about the R-sig-Geo
mailing list