Spatial dynamic panel data lag model with fixed effects maximum likelihood estimation.
Spatial dynamic panel data lag model with fixed effects maximum likelihood estimation.
This function estimates spatial panel model with fixed effects for static or dynamic model. It includes the transformation approach suggested by Yu et al (2008) and Lee and Yu (2010).
formula: a symbolic description for the (static) model to be estimated, not including the dynamic component
data: a data.frame
W: spatial weights matrix
index: the indexes (Names of the variables for the spatial and time component. The spatial is first and the time second.)
model: a models to be calculated, c("sar","sdm"), default = "sar"
effect: type of fixed effects, c("none","individual","time","twoways"), default ="individual"
ldet: type of computation of log-determinant, c("full","mc"). Default "full" for smaller problems, "mc" for large problems.
lndetspec: specifications for the calculation of the log-determinant for mcmc calculation. Default list(p=NULL,m=NULL,sd=NULL), if the number of spatial units is >1000 then list(p=30,m=30,sd=12345)
dynamic: logical, if TRUE time lag of the dependent variable is included. Default = FALSE
tlaginfo: specification for the time lag, default = list(ind=NULL,tl=FALSE,stl=FALSE), see details
LYtrans: logical, default FALSE. If the Lee-Yu transformation should be used for bias correction
incr: increment for vector of values for rho
rintrv: logical, default TRUE, calculates eigenvalues of W. If FALSE, the interval for rho is (-1,1)
demn: logical, if Lee-Yu transformation for demeaning of the variables to remove fixed effects is performed (only used in static models). Default FALSE
DIRtrans: logical, if direct transformation of variables should be used. Default, FALSE (only used in dynamic models with "twoways" effects)
Returns
An object of class "SDPDm" - coefficients: coefficients estimate of the model parameters (coefficients1 for dynamic model)
rho: spatial coefficient
sige: residuals variance
llik: the value of the log likelihood function
...:
Details
Based on MatLab functions sar_jihai.m, sar_jihai_time.m and sar_panel_FE.m
ind i-th column in data which represents the time lag, if not specified then the lag from the dependent variable is created and the panel is reduced from nt to n(t-1)
tl logical, default TRUE. If TRUE yt−1
(the lagged dependent variable in time is included)
stl logical, default TRUE. If TRUE Wyt−1
(the lagged dependent variable in space and time is included)
Examples
library("SDPDmod")data(Produc, package ="plm")data(usaww, package ="splm")form1 <- log(gsp)~ log(pcap)+ log(pc)+ log(emp)+ unemp
mod1 <- SDPDm(formula = form1, data = Produc, W = usaww, index = c("state","year"), model ="sar", effect ="individual", LYtrans =TRUE)summary(mod1)imp1 <- impactsSDPDm(mod1)summary(imp1)mod2 <- SDPDm(formula = form1, data = Produc, W = usaww, index = c("state","year"), model ="sdm", effect ="twoways", LYtrans =TRUE, dynamic =TRUE, tlaginfo=list(ind =NULL, tl =TRUE, stl =TRUE))summary(mod2)
References
Yu, J., De Jong, R., & Lee, L. F. (2008). Quasi-maximum likelihood estimators for spatial dynamic panel data with fixed effects when both n and T are large. Journal of Econometrics, 146(1), 118-134.
Lee, L. F., & Yu, J. (2010). Estimation of spatial autoregressive panel data models with fixed effects. Journal of Econometrics, 154(2), 165-185.
Lee, L. F., & Yu, J. (2010). A spatial dynamic panel data model with both time and individual fixed effects. Econometric Theory, 564-597.