Hi all, I am trying to run an autologistic model using the function errorsarlm from spdep package.
**I built an XY matrix extracting the two colums from matriz** coords1<-matriz[matriz$casos1==1, c(4,5)] coords1<-as.matrix(coords1) **I identify neighbours of region points** nb20<-dnearneigh(coords1,0,20,longlat=TRUE) ** I build a neighbours list with spatial weights** nb20.w<-nb2listw(nb20, glist=NULL, style="W", zero.policy=TRUE) **I run a glm** glm1<-glm(matriz$sp~poly(matriz$iso,3)+poly(matriz$tmax,3)+poly(matriz$mdr,3)+poly(matriz$twq,3)+poly(matriz$tmin,3)+poly(matriz$pdq,3)+poly(matriz$trng,3),data=matriz, subset=matriz$casos1>0, family=binomial) glm.scope<-list("var1"=~1+iso+poly(iso,2)+poly(iso,3),"var2"=~1+tmax+poly(tmax,2)+poly(tmax,3),"var3"=~1+mdr+poly(mdr,2)+poly(mdr,3),"var4"=~1+twq+poly(twq,2)+poly(twq,3),"var5"=~1+tmin+poly(tmin,2)+poly(tmin,3),"var6"=~1+pdq+poly(pdq,2)+poly(pdq,3),"var7"=~1+trng+poly(trng,2)+poly(trng,3),"var8"=~1+mdr+poly(mdr,2)+poly(mdr,3)) final.glm1<-step.gam(glm1,glm.scope,direction="back") **I want to estimate the spatial simultaneous autoregressive error model** res20<-errorsarlm(finalglm1, listw=nb20.w, zero.policy=TRUE) But here I receive the following error message: Error in solve.default(asyvar, tol = tol.solve) : system is computationally singular: reciprocal condition number = 2.8713e-12 What is happening? What does this message mean? Thanks a lot, Alberto --------------------------------------- Alberto Jiménez-Valverde Natural History Museum and Biodiversity Research Center The University of Kansas Lawrence, Kansas 66045 USA email 1: [EMAIL PROTECTED] email 2: [EMAIL PROTECTED] CV: http://www.biogeografia.com/CV/ajimenez/albertojimenezvalverde.htm [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.