[R-sig-Geo] Spatial Panel Models Problem (Splm package)

felipe tavares ftavares29 at gmail.com
Sat May 5 02:29:09 CEST 2018


Good evening.

I am trying to estimate a spatial panel data model through splm package.

I am facing the error: Error in lag.listw(listw, u, zero.policy =
zero.policy) :
  object lengths differ

However, my W matrix is NxN, my y vector is NTx1 and my X matrix is NTxK.

My code is:
poly <- readOGR(dsn ="C:/Users/fstavares/OneDrive/Resource Policy Paper",
layer = "RJ")
RJ <- poly2nb(poly)
W <- nb2listw(RJ, zero.policy = TRUE, style = "W", glist = NULL)
SEM <- spml(gdp ~ oivrev, listw = W, model="within", spatial.error="b",
lag=F, data=panel)


Does anyone have faced this problem?

I can send database and code, if it somebody can help me.



-- 
Att,

Felipe Tavares
Bacharel em Ciências Econômicas - UFSCar
Mestrando em Economia Aplicada - ESALQ/USP
Analista Pricing - ALLIED Technology

Telefone:
(011) 97468-0833

e-mail:
ftavares29 at gmail.com
f <ftavares29 at usp.br>stavares at alliedbrasil.com.br

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list