spreml {splm}R Documentation

Spatial Panel Model with Random Effects by Maximum Likelihood

Description

Maximum likelihood (ML) estimation of spatial panel models with random effects and serial error correlation.

Usage

spreml(formula, data, index = NULL, w, w2=w, lag = FALSE,
          errors = c("semsrre", "semsr", "srre", "semre",
                     "re", "sr", "sem","ols", "sem2srre",
                     "sem2re", "semgre"),
          pvar = FALSE, hess = FALSE, quiet = TRUE,
          initval = c("zeros", "estimate"),
          x.tol = 1.5e-18, rel.tol = 1e-15, ...) 

Arguments

formula

a symbolic description of the model to be estimated

data

an object of class data.frame or pdata.frame. A data frame containing the variables in the model. When the object is a data.frame, the first two columns shall contain the indexes, unless otherwise specified. See index

index

if not NULL (default), a character vector to identify the indexes among the columns of the data.frame

w

an object of class listw or a matrix. It represents the spatial weights to be used in estimation.

w2

an object of class listw or a matrix. Second set of spatial weights for estimation, if different from the first (e.g., in a 'sarar' model).

lag

default=FALSE. If TRUE, a spatial lag of the dependent variable is added.

errors

Specifies the error covariance structure. See details.

pvar

legacy parameter here only for compatibility.

hess

default=FALSE. If TRUE estimate the covariance for beta_hat by numerical Hessian instead of GLS at optimal values.

quiet

default=TRUE. 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

control parameter for tolerance. See nlminb for details.

rel.tol

control parameter for relative tolerance. See nlminb for details.

...

additional arguments to pass over to other functions, e.g. method.

Details

Second-level wrapper for estimation of random effects models with serial and spatial correlation. The specifications without serial correlation (no "sr" in errors) can be called through spml, the extended ones only through spreml. The models are estimated by two-step Maximum Likelihood. Abbreviations in errors correspond to: "sem" Anselin-Baltagi type spatial autoregressive error: if present, random effects are not spatially correlated; "sem2" Kapoor, Kelejian and Prucha-type spatial autoregressive error model with spatially correlated random effects; "sr" serially correlated remainder errors; "re" random effects; "ols" spherical errors (usually combined with lag=T). The optimization method can be passed on as optional parameter. Default is "nlminb"; all constrained optimization methods from maxLik are allowed ("BFGS", "NM", "SANN") but the latter two are still experimental.

Value

An object of class "splm".

coefficients

coefficients estimate of the model parameters

arcoef

the coefficient for the spatial lag on y

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{\beta}

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 errors argument

Author(s)

Giovanni Millo

References

Millo, G. (2014) Maximum likelihood estimation of spatially and serially correlated panels with random effects. Computational Statistics and Data Analysis, 71, 914–933.

See Also

spml

Examples

data(Produc, package = "plm")
data(usaww)
fm <- log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp
## random effects panel with spatial lag and serial error correlation
## optimization method set to "BFGS"
sarsrmod <- spreml(fm, data = Produc, w = usaww, errors="sr", lag=TRUE,
                    method="BFGS")
summary(sarsrmod)

[Package splm version 1.6-5 Index]