[R-sig-Geo] SLX model for splm package in R
dfamaral at usp.br
dfamaral at usp.br
Sun Aug 28 21:04:05 CEST 2016
Dear colleagues,
Does anyone know how to implement Spatial Lag of X (SLX) model for panel data using splm package? I tried the following to create a WX matrix and then apply Fixed and Random Effects:
tb <- read.csv2("panel.csv", header = TRUE, sep = ";", dec = ".")
time <- length(unique(tb$year))
X <- as.matrix(tb[ ,3:20])
WX <- slag(X, listw, maxlag = 1)
I see that slag is applicable for vectors of pseries, but this command led to the error message: "Error in UseMethod("slag"): no applicable method for 'slag' applied to an object of class "c('matrix', 'double', 'numeric')"
Is there any way to implement this SLX model for panel series?
Regards,
Daniel.
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list