Learn R Programming

spsur (version 1.0.0.2)

spsurtime: Estimation of SUR models for simple spatial panels (G=1).

Description

This function estimates SUR models for simple spatial panel datasets. spsurtime is restricted, specifically, to cases where there is only one equation, G=1, and a varying number of spatial units, N, and time periods, Tm. The SUR structure appears in form of serial dependence among the error terms corresponding to the same spatial unit. Note that it is assumed that all spatial units share a common pattern of serial dependence.

The user can choose between different types of spatial specifications, as described below, and the estimation algorithms allow for the introduction of linear restrictions on the \(\beta\) parameters associated to the regressors. The spatial panels with SUR structure can be estimated by maximum-likelihood methods or three-stages least squares procedures, using spatial instrumental variables.

Usage

spsurtime(Form, data, time, type = "sim", method = "ml", maxlagW = 2,
  W = NULL, cov = TRUE, demean = FALSE, trace = TRUE, R = NULL,
  b = NULL)

Arguments

Form

An object created with the package Formula that describes the model to be estimated. This model may contain several responses (explained variables) and a varying number of regressors in each equation.

data

An object of class data.frame or a matrix.

time

Time variable.

type

Type of spatial model specification: "sim","slx", "slm", "sem", "sdm", "sdem" or "sarar". Default = "sim".

method

Method of estimation for the spatial panel SUR model, either ml or 3sls. Default = ml.

maxlagW

Maximum spatial lag order of the regressors employed to produce spatial instruments for the spatial lags of the explained variables. Default = 2. Note that in case of type="sdm", the default value for maxlagW is set to 3 because the first lag of the regressors, \(WX_{tg}\), can not be used as spatial instruments.

W

A spatial weighting matrix of order (NxN), assumed to be the same for all equations and time periods.

cov

Logical value to show the covariance matrix of the beta coefficients. Default = TRUE.

demean

Logical value to allow for the demeaning of panel data, sustracting the individual mean to each spatial or cross-sectional unit. Default = FALSE.

trace

Logical value to show intermediate results. Default = TRUE.

R

A row vector of order (1xpr) with the set of r linear constraints on the beta parameters. The first restriction appears in the first p terms, the second restriction in the next p terms and so on. Default = NULL.

b

A column vector of order (rx1) with the values of the linear restrictions on the beta parameters. Default = NULL.

Value

Output of the maximum-likelihood or three-stages least-squares estimation of the spatial panel SUR model. The final list depends of the estimation method but, typically, you will find information about:

call Matched call.
type Type of model specified.
betas Estimated coefficients for the regressors.
deltas Estimated spatial coefficients.
se_betas Estimated standard errors for the estimates of beta.
se_deltas Estimated standard errors for the estimates of the spatial coefficients.
cov Estimated covariance matrix for the estimates of beta's and spatial coefficients.
llsur Value of the likelihood function at maximum-likelihood estimation.Only if method = ml.
R2 Global coefficient of determination for the Tm equations, obtained as the squared of the correlation coefficient between the corresponding explained variable and its estimates.
Sigma Estimated covariance matrix for the residuals of the G equations.
Sigma_corr stimated correlation matrix for the residuals of the G equations.
Sigma_inv Inverse of Sigma, the (GxG) covariance matrix of the residuals of the SUR model.
residuals Residuals of the model.
df.residuals Degrees of freedom for the residuals.
fitted.values Estimated values for the dependent variables.
BP Value of the Breusch-Pagan statistic to test the null hypothesis of diagonality among the errors of the G equations. Only if method = ml.
LMM Marginal Lagrange Multipliers, LM(\(\rho\)|\(\lambda\)) and LM(\(\lambda\)|\(\rho\)), to test for omitted spatial effects in the specification. Only if method = ml.
N Number of cross-sections or spatial units.
Tm Number of time periods.
demean Logical value used for demeaning.
W Spatial weighting matrix.

Details

Function spsurtime only admits a formula, created with Formula and a dataset of class data.frame or matrix. That is, the data cannot be uploaded using data matrices \(Y\) and \(X\) provided for other functions in this package. The argument time selects the variable, in the data.frame, associated to the time dimension in the panel dataset. Then spsurtime operates as in Anselin (1988), that is, each cross-section is treated as if it were an equation in a SUR model, which now has Tm 'equations' and N individuals. The SUR structure appears because there is serial dependence in the errors of each individual in the panel. The serial dependence in the errors is not parameterized, but estimated non-parametrically in the \(Sigma\) covariance matrix returned by the function. An important constraint to mention is that the serial dependence assumed to be the same for all individuals in the sample. Serial dependence among individuals is excluded from Anselin approach.

References

  • Anselin, L. (1988). Spatial econometrics: methods and models. Dordrecht, Kluwer Academic Publishers.

  • L<U+00F3>pez, F.A., Mur, J., and Angulo, A. (2014). Spatial model selection strategies in a SUR framework. The case of regional productivity in EU. Annals of Regional Science, 53(1), 197-220.

  • L<U+00F3>pez, F.A., Mart<U+00ED>nez-Ortiz, P.J., & Cegarra-Navarro, J.G. (2017). Spatial spillovers in public expenditure on a municipal level in Spain. Annals of Regional Science, 58(1), 39-65.

  • Mur, J., L<U+00F3>pez, F., and Herrera, M. (2010). Testing for spatial effects in seemingly unrelated regressions. Spatial Economic Analysis, 5(4), 399-440.

See Also

spsurml, spsur3sls, wald_betas, lmtestspsur, lrtestspsur

Examples

Run this code
# NOT RUN {
####################################
######## PANEL DATA (G=1; Tm>1) ###
####################################

## Example 1:
rm(list = ls()) # Clean memory
N <- nrow(spc)
Tm <- 2
index_time <- rep(1:Tm, each = N)
index_indiv <- rep(1:N, Tm)
WAGE <- c(spc$WAGE83, spc$WAGE81)
UN <- c(spc$UN83, spc$UN80)
NMR <- c(spc$NMR83, spc$NMR80)
SMSA <- c(spc$SMSA, spc$SMSA)
pspc <- data.frame(index_indiv,index_time,WAGE,UN,NMR,SMSA)
form_pspc <- WAGE ~ UN + NMR + SMSA

# SLM by 3SLS
pspc_slm <- spsurtime(Form = form_pspc, data = pspc, W = Wspc,
                      time = pspc$index_time, type = "slm", method = "3sls")
                      summary(pspc_slm)
# }

Run the code above in your browser using DataLab