Problem with splm

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem with splm

Hulényi Martin
Hello,

when I run the spatial 2sls from the splm package using the spgm command, I get an error that the panel is unbalanced, even though it is balanced: The data
str(pdata.natura1)
Classes 'pdata.frame' and 'data.frame': 4680 obs. of  63 variables
The spatial weight matrix (inverse distance):
    str(dm1.lw)
    List of 3
     $ style     : chr "W"
     $ neighbours:List of 260
     $ weights   :List of 260
The conducted regression:
spgr01<-spgm(rgrowthpc~lrgdp0pc+lefpayr,
             data=pdata.natura1, listw=dm1.lw,
             model="within", lag=TRUE, spatial.error= TRUE,
             endog=~lefpayr, instruments=~area_prop,
             method="w2sls"
             )
Error in spsarargm(formula = formula, data = data, index = index, listw = listw,  :
  Estimation method unavailable for unbalanced panels
However:
is.pbalanced(pdata.natura1)
[1] TRUE
Can anyone please tell me where is the mistake?

Best regards,

Martin
[eco.jpg]       Pred vytla�en�m tohto mailu zv�te pros�m vplyv na �ivotn� prostredie. �akujeme.
Please consider the environment before printing this e-mail. Thanks

        [[alternative HTML version deleted]]


_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo