Estimating Systems of Simultaneous Equations

Econometric estimation of simultaneous systems of linear and nonlinear equations using Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Seemingly Unrelated Regressions (SUR), Two-Stage Least Squares (2SLS), Weighted Two-Stage Least Squares (W2SLS), and Three-Stage Least Squares (3SLS) as suggested, e.g., by Zellner (1962) , Zellner and Theil (1962) , and Schmidt (1990) .



Please note that only the most significant changes are reported here. A full ChangeLog is available in the log messages of the SVN repository on R-Forge.

        CHANGES IN VERSION 1.1-22 (2018-04-04)
  • made this package compatible to the latest version of the "Matrix" package

          CHANGES IN VERSION 1.1-20 (2017-03-09)
  • users can now use pdata.frame() (in addition to to specify the panel structure of (panel) data sets (patch provided by Kevin Tappe -- thanks a lot!) [note: the use of is deprecated]

          CHANGES IN VERSION 1.1-18 (2015-08-27)
  • added argument 'residCovDiag' to logLik.systemfit()

  • improved documentation of logLik.systemfit():

  • slightly improved documentation of systemfit():

  • imported functions from packages 'methods' and 'stats' (as indicated by 'R CMD check --as-cran' when using R-devel)

          CHANGES IN VERSION 1.1-16 (2015-06-08)
  • fixed a few minor issues pointed out by 'R CMD check'

          CHANGES IN VERSION 1.1-14 (2012-11-17)
  • added (incomplete) estfun() method (from the "sandwhich" package) for objects of class "systemfit" (currently, the residual covariance matrix is always assumed to be the identity matrix, although this is only true for OLS estimations!); therefore, the sandwich package is now "imported"

  • changed dependency ("Imports") from "stats (>= 2.15.0)" to "stats (>= 2.14.0)"

          CHANGES IN VERSION 1.1-12 (2012-06-02)
  • added nobs() method for objects of class "systemfit"

          CHANGES IN VERSION 1.1-10 (2011-11-11)
  • slightly revised the package vignette so that it works with version 2.0 of the "sem" package

          CHANGES IN VERSION 1.1-8
  • the systemfit package now works with version 2.0 of the "car" package (linear.hypothesis() has been renamed as linearHypothesis())

          CHANGES IN VERSION 1.1-6
  • the logLik method now uses the average number of non-NA observations per equation (instead of the number of rows of the residual matrix, which might include NAs) to calculate the log-likelihood value: hence, the likelihood value is correct now even if there are NAs in the data; the calculation of the log-likelihood value for unbalanced systems uses the conditional density function for the unbalanced observations assuming that the errors of not-included observations are zero (the log-likelihood value was incorrect before if there were NAs in the data)

  • the logLik() method now takes the number of (linearly independent) coefficients from element "rank" to calculate the degrees of freedom, because this is correct even if there are NAs in the data (it was incorrect before if there were NAs in the data)

  • the logLik() method now returns (as attribute "nobs") the correct number of observations even if there are NAs in the data (it was incorrect before if there were NAs in the data)

          CHANGES IN VERSION 1.1-4
  • model.matrix.systemfit.equation() now returns a matrix (and not a vector) even if the equation has only one regressor (including the constant); this fixes bugs in model.matrix.systemfit() and predict.systemfit() that occured if (at least) one equation has only one regressor

          CHANGES IN VERSION 1.1-2
  • the subfolder "tests" and the test scripts in this subfolder are no longer included in the R package in order to reduce the time for checking this package on CRAN

          CHANGES IN VERSION 1.1-0
  • added a NAMESPACE file

  • the returned fitted values, residuals, and the model frame include all observations now, where fitted values and residuals of observation that were not included in the estimation are NA

  • systemfit can estimate systems of equations with unequal numbers of observations now

          CHANGES IN VERSION 1.0-4
  • added our JSS paper about systemfit as a vignette

  • please take a look at the log messages of the SVN repository on R-Forge

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.1-24 by Arne Henningsen, 2 years ago

Browse source code at

Authors: Arne Henningsen and Jeff D. Hamann

Documentation:   PDF Manual  

Task views: Econometrics, Psychometric Models and Methods

GPL (>= 2) license

Imports stats, sandwich, MASS, methods

Depends on Matrix, car, lmtest

Suggests plm, sem

Imported by ChainLadder, SIRE, cancerGI, diffusion, diseq, erer, forestmangr, micEconAids, micEconCES, micEconSNQP, modnets, packDAMipd, sampleSelection, tvReg.

Depended on by nmm.

Suggested by AER, broom, micEcon, robustsur.

See at CRAN