spsur3sls can be used to estimate two groups of spatial models:
"slm": SUR model with spatial lags of the endogenous in the right hand
side of the equations
$$y_{tg} = \lambda_{g} Wy_{tg} + X_{tg} \beta_{g} + \epsilon_{tg} $$
"sdm": SUR model of the Spatial Durbin type
$$ y_{tg} = \lambda_{g} Wy_{tg} + X_{tg} \beta_{g} +
WX_{tg} \theta_{g} + \epsilon_{tg} $$
where \(y_{tg}\) and \(\epsilon_{tg}\) are (Nx1) vectors,
corresponding to the g-th equation and time period t; \(X_{tg}\) is the matrix
of regressors, of order (Nxp_g). Moreover, \(\lambda_{g}\) is a
spatial coefficient and W is a (NxN) spatial weighting matrix.
By default, the input of this function is an object created with Formula
and
a data frame. However, spsur3sls also allows for the direct especification of vector
Y and matrix X, with the explained variables and regressors respectively, as
inputs (these terms may be the result, for example, of dgp_spsur
).
spsur3sls is a Least-Squares procedure in three-stages designed to circumvent
the endogeneity problems due to the presence of spatial lags of the explained variable
in the right hand side of the equations do the SUR. The instruments are produced internally
by spsur3sls using a sequence of spatial lags of the X variables, which are assumed
to be exogenous. The user must define the number of (spatial) instruments to be used in the
procedure, through the argument maxlagW (i.e. maxlagW=3). Then, the collection of
instruments generated is \([WX_{tg}; W*WX_{tg}; W*W*WX_{tg}]\). In the case of a SDM,
the first lag of the X matrix already is in the equation and cannot be used as instrument.
In the example above, the list of instruments for a SDM model would be
\([W^{2}X_{tg}; W^{3}X_{tg}]\).
The first stage of the procedure consists in the least squares of the Y variables
on the set of instruments. From this estimation, the procedure retains the estimates of Y
in the so-called Yls variables. In the second stage, the Y variables that
appear in the right hand side of the equation are substituted by Yls and the SUR model
is estimated by Least Squares. The third stage improves the estimates of the second stage
through a Feasible Generalized Least Squares estimation of the parameters of the model,
using the residuals of the second stage to estimate the Sigma matrix.
The arguments R and b allows to introduce linear restrictions on the beta
coefficients of the G equations. spsur3sls
, first, introduces the
linear restrictions in the SUR model and builds, internally, the corresponding constrained
SUR model. Then, the function estimates the restricted model which is shown in the output.
The function does not compute the unconstrained model nor test for the linear restrictions.
The user may ask for the unconstrained estimation using another spsurml
estimation. Moreover, the function wald_betas
obtains the Wald test
of a set of linear restrictions for an object created previously
by spsurml
or spsur3sls
.