
Dear all, When I run the SAR model, I get the error like this. Can u suggest me how can I solve this issue? or what could be the cause of this problem?> sar<-spautolm(yield~Temp+precept, data=data, listw=SD_queenW)Error in t(IlW) :   error in evaluating the argument 'x' in selecting a method for function 't': Error in get("I", envir = env) - lambda * get("W", envir = env) :   non-conformable arraysCan anybody help me how to fix this issue.?
If you need to see the entire code, is is here:##SDdata<-read.csv("SD.csv",header=TRUE)head(data)tail(data)attach(data)#MAP plottinglibrary(maps)library(spdep)library(rgdal)library(alr3)SD<-map("county", "SOUTH DAKOTA", fill=TRUE, plot=FALSE)county.names<-as.character(SD$names)SD.sp<-map2SpatialPolygons(SD, IDs=county.names, proj4string=CRS("+proj=longlat"))SD_queen<-poly2nb(SD.sp, queen=TRUE)SD_rook<-poly2nb(SD.sp, queen=FALSE)SD_queenW<-nb2listw(SD_queen, style="B")SD_queenWsummary(SD_queenW)SD_queenWC<-nb2listw(SD_queen, style="C")SD_rookW<-nb2listw(SD_rook, style="B")SD_rookWsummary(SD_rookW)#SARsar<-spautolm(yield~Temp+precept, data=data, listw=SD_queenW)summary(sar)#CARcar<-spautolm(yield~Temp+precept, data=data, family="CAR", listw=SD_queenW)summary(car)

Thanks,Mitra DevkotaBrookings, SD 57006571 242 6140"A person who never made a mistake never tried anything new". -Albert Einstein


 


 		 	   		   		 	   		   		 	   		  
	[[alternative HTML version deleted]]

