[R] error while estimating spatial Durbin (mixed) model

wujunqian wujunqian at zju.edu.cn
Thu Sep 27 14:44:26 CEST 2012


Dear all,
I am new here ,I attempted to use R to estimate the spatial Durbin (mixed)
model,and mydata is a panel data form,and the matrix is generated by geoda
software ,here is my Command and error,really hope your help ,thank you!
#引入gal
library(spdep)
w<- read.gal("E:/splm/zj.GAL",override.id=TRUE)
ww<-nb2listw(w,zero.policy=TRUE)
#引入数据 
library(foreign)
mydata<-read.dta("E:/splm/merge.dta")
#回归 
library(splm)
fm<-lrincome~ishare+mgdp+tinput
ssss<-lagsarlm(fm, data = mydata,listw =ww,zero.policy=TRUE,type="mixed")
summary(ssss)

error:Input data and weights have different dimensions




--
View this message in context: http://r.789695.n4.nabble.com/error-while-estimating-spatial-Durbin-mixed-model-tp4644375.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list