Fits a set of linear structural equations using Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Seemingly Unrelated Regression (SUR), with the option of autocorrelation correlation.
systemfitAR(formula, method = "OLS", inst = NULL, data = list(),
restrict.matrix = NULL, restrict.rhs = NULL, restrict.regMat = NULL,
pooled = FALSE, control = systemfit.control( ... ),
AR1 = FALSE, rho.sel = c("all", "mean"), model = c("static", "dynamic"), ...)
systemfit
returns a list of the class systemfit
.
This list contains one special object: "eq". It is a list and contains
one object for each estimated equation. These objects are of the class
systemfit.equation
and contain the results that belong only to the
regarding equation. In addition, there are four new items in the output:
The objects of the class systemfit
and
systemfit.equation
have the following components (the elements of
the latter are marked with an asterisk (\(*\))):
autocorrelation coefficient
standard error of rho; if rho.sel = "mean"
, then it is a vector of the standar errors for individual equations.
data used for systemfit
; this is data adjusted for autocorrelation if AR1 = TRUE
; otherwise, it is just the raw data.
forumula used for systemfit
. This can be adjusted for autocorrelation; costant is adjusted as (1 - rho).
an object of class formula
(for single-equation models) or (typically) a list of objects of class
formula
(for multiple-equation models).
the estimation method, one of "OLS", "WLS", "SUR";
iterated estimation methods can be specified by setting control parameter
maxiter
larger than 1 (e.g. 500).
one-sided model formula specifying instrumental variables or a list of one-sided model formulas if different instruments should be used for the different equations (only needed for 2SLS, W2SLS, and 3SLS estimations).
an optional data framecontaining the variables in the model.
an optional j x k matrix to impose linear
restrictions on the coefficients by
restrict.matrix
* \(b\) = restrict.rhs
(j = number of restrictions, k = number of all coefficients,
\(b\) = vector of all coefficients)
an optional vector with j elements to impose linear
restrictions (see restrict.matrix
); default is a vector
that contains j zeros.
an optional matrix to impose restrictions on the coefficients by post-multiplying the regressor matrix with this matrix (see details).
list of control parameters.
The default is constructed by the function systemfit.control
.
See the documentation of systemfit.control
for details.
logical, restrict coefficients to be equal in all equations (only for panel-like data).
whether first-order autocorrelation is corrected
how rho is computed; rho.sel = "all"
means that the system is estimated as a single equation and the residuals are used to compute rho. If "mean", each equation in the system is estimated separately and the average of rhos from all the equations are used.
Static model has interceipt, while dynamic model has no intercept; see translog cost function and the package for detail.
arguments passed to systemfit.control
.
Changyou Sun (edwinsun258@gmail.com)
This is a wrapper of systemfit
with an addition of autocorrelation correction. It is mainly used for SUR model with autocorrelation. The main reference sources are Greene (2003), LIMDEP 9.0 manual, Judge et al. (1985), and Berndt and Savin (1975).
Greene, W. H. (2003) Econometric Analysis, Fifth Edition, Prentice Hall.
Judge, George G.; W. E. Griffiths; R. Carter Hill; Helmut Luetkepohl and Tsoung-Chao Lee (1985) The Theory and Practice of Econometrics, Second Edition, Wiley.
LIMDEP 9.0 software manual.
Berndt, E.R., and N.E. Savin. 1975. Estimation and hypothesis testing in singular equation systems with autoregressive disturbances. Econometrica 43(5/6):937-957.
lm
; aiStaFit
; systemfit
# Check Berndt and Savin (1975) dataset
# Check Kemenda data
Run the code above in your browser using DataLab