[Splm-commits] SPFEML - Error in lag.listw(listw, u) : object lengths differ

Laurent Van Malderen laurent.vanmalderen at fucam.ac.be
Tue Aug 17 15:54:54 CEST 2010


Hello everybody,

I'm Van Malderen Laurent and I'm working at the Catholic University of Louvain in Belgium.

I would like to make a spatial regression on panel data but I have some troubles with the SPFEML function. I have always the following error message: Error in lag.listw(listw, u) : object lengths differ. I use a spatial queen contiguity weight matrix created with Geoda.

I'm a bit new in R, and I don't see what's the problem with my listw ?

Here is my R code :

mem <- read.csv("tot1.txt", header=TRUE,sep=" ")
pds <- read.gal("pds.gal",override=TRUE)	
Pds <- nb2listw(pds,glist=NULL,style="W",zero.policy=FALSE)
fm <- IPP ~ POP + REV + SUP + DENS + GAUCHE1 + DROITE1
MemI2 <- pdata.frame(mem,262,5)
spfeml(fm,MemI2,index=NULL,Pds,model=c("lag"),effects="spfe",method="eigen")

Thank you in advance for the attention you will bring to my request,

Van Malderen Laurent
Research Assistant CORE/UCL
Voie du Roman Pays, 14
1348 Louvain la Neuve
vanmalderenl at fucam.ac.be


More information about the Splm-commits mailing list