Spatial Panel Model by Maximum Likelihood
Maximum likelihood (ML) estimation of spatial panel models, possibly with fixed or random effects.
spml(formula, data, index=NULL, listw, listw2=listw, na.action, model=c("within","random","pooling"), effect=c("individual","time","twoways"), lag=FALSE, spatial.error=c("b","kkp","none"), ...)
formula |
a symbolic description of the model to be estimated |
data |
an object of class |
index |
if not NULL (default), a character vector to identify the indexes among the columns of the |
listw |
an object of class |
listw2 |
an object of class |
na.action |
see spdep for more details. |
model |
one of |
effect |
one of |
lag |
default= |
spatial.error |
one of |
... |
additional argument to pass over to other functions |
The models are estimated by two-step Maximum Likelihood.
Further optional parameters to be passed on to the estimator may be:
pvar: if TRUE
the pvar
function is called
hess: if TRUE
use numerical Hessian instead of GLS for the
standard errors of the estimates
quiet: if FALSE
report function and parameters values during
optimization
initval: one of c("zeros", "estimate")
, the initial values for
the parameters. If "zeros"
a vector of zeros is used. if
"estimate"
the initial values are retreived from the estimation
of the nested specifications. Alternatively, a numeric vector can be
specified.
x.tol: Tolerance. See nlminb
for details.
rel.tol: Relative tolerance. See nlminb
for details.
An object of class "splm"
.
coefficients |
coefficients estimate of the model parameters |
arcoef |
the coefficient for the spatial lag on |
errcomp |
the estimates of the error variance components |
vcov |
the asymptotic variance covariance matrix of the estimated coefficients |
vcov.arcoef |
the asymptotic variance of the estimated spatial lag parameter |
vcov.errcomp |
the asymptotic variance covariance matrix of the estimated error covariance parameters |
type |
'random effects ML' |
residuals |
the model residuals |
fitted.values |
the fitted values, calculated as \hat{y}=X \hat{β} |
sigma2 |
GLS residuals variance |
model |
the matrix of the data used |
call |
the call used to create the object |
logLik |
the value of the log likelihood function at the optimum |
errors |
the value of the |
Giovanni Millo
Baltagi, B.H., Song, S.H., Jung B. and Koh, W. (2007) Testing panel data regression models with spatial and serial error correlation. Journal of Econometrics, 140, 5-51.
Millo, G., Piras, G. (2012) splm: Spatial Panel Data Models in R. Journal of Statistical Software, 47(1), 1–38. URL http://www.jstatsoft.org/v47/i01/.
spgm
data(Produc, package = "plm") data(usaww) fm <- log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp ## the two standard specifications (SEM and SAR) one with FE ## and the other with RE: ## fixed effects panel with spatial errors fespaterr <- spml(fm, data = Produc, listw = mat2listw(usaww), model="within", spatial.error="b", Hess = FALSE) summary(fespaterr) ## random effects panel with spatial lag respatlag <- spml(fm, data = Produc, listw = mat2listw(usaww), model="random", spatial.error="none", lag=TRUE) summary(respatlag) ## calculate impact measures impac1 <- impacts(respatlag, listw = mat2listw(usaww, style = "W"), time = 17) summary(impac1, zstats=TRUE, short=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.