[R-sig-Geo] About an Error coming from the Moran Eigenvectors method in spdep package

Lei Wang leiwang.uconn at gmail.com
Thu Sep 6 23:11:30 CEST 2012


Dear listers and Prof. Bivand,

I started working on spatial econometrics and R three weeks ago and this is my first time posting here. 

My dependent variable is a count variable and its variance is much greater than its mean. So I choose negative binomial regression and use glm.nb() to do it. I also suspect that there maybe spatial autocorrelation issue in the residuals. In order to reduce this residual spatial autocorrelation in the error of my model, I am using the Moran Eigenvectors approach.  And I use the inverse distance matrix as the weights. Below is my model and the error message from R:

fypME<-ME(Count ~ CTN + CSTN + Price + Rating, data=fyp, family=negative.binomial(theta=2.9, link=log), listw=fyp.dists.inv.listw, alpha=0.05)

Error in if (pIZ > alpha) stop("base correlation larger than alpha") : missing value where TRUE/FALSE needed

Could anybody help me with this? What does this error mean? and how should I fix this?

Thanks a lot!

Michelle


More information about the R-sig-Geo mailing list