systemfitAR function

Linear Equation System Estimation with Correction on Autocorrelation

Linear Equation System Estimation with Correction on Autocorrelation

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"), ...)

Arguments

  • formula: an object of class formula

    (for single-equation models) or (typically) a list of objects of class formula (for multiple-equation models).

  • method: 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).

  • inst: 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).

  • data: an optional data framecontaining the variables in the model.

  • restrict.matrix: an optional j x k matrix to impose linear restrictions on the coefficients by restrict.matrix * bb = restrict.rhs

    (j = number of restrictions, k = number of all coefficients, bb = vector of all coefficients)

  • restrict.rhs: an optional vector with j elements to impose linear restrictions (see restrict.matrix); default is a vector that contains j zeros.

  • restrict.regMat: an optional matrix to impose restrictions on the coefficients by post-multiplying the regressor matrix with this matrix (see details).

  • control: list of control parameters. The default is constructed by the function systemfit.control. See the documentation of systemfit.control for details.

  • pooled: logical, restrict coefficients to be equal in all equations (only for panel-like data).

  • AR1: whether first-order autocorrelation is corrected

  • rho.sel: 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.

  • model: Static model has interceipt, while dynamic model has no intercept; see translog cost function and the package for detail.

  • ...: arguments passed to systemfit.control.

Details

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).

Returns

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 (*)):

  • rho: autocorrelation coefficient

  • rho_ste: standard error of rho; if rho.sel = "mean", then it is a vector of the standar errors for individual equations.

  • data: data used for systemfit; this is data adjusted for autocorrelation if AR1 = TRUE; otherwise, it is just the raw data.

  • formula: forumula used for systemfit. This can be adjusted for autocorrelation; costant is adjusted as (1 - rho).

References

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.

Author(s)

Changyou Sun (edwinsun258@gmail.com )

See Also

lm; aiStaFit; systemfit

Examples

# Check Berndt and Savin (1975) dataset # Check Kemenda data
  • Maintainer: Changyou Sun
  • License: GPL (>= 2)
  • Last published: 2024-09-26

Useful links