Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

model.matrix.systemfit

Construct Design Matrices for Systems of Equations


Description

These functions create design matrices from objects returned by systemfit.

Usage

## S3 method for class 'systemfit'
model.matrix( object, which = "x", ... )

   ## S3 method for class 'systemfit.equation'
model.matrix( object, which = "x", ... )

Arguments

object

an object of class systemfit or systemfit.equation.

which

character string: "x" indicates the usual model matrix of the regressors, "xHat" indicates the model matrix of the fitted regressors, "z" indicates the matrix of instrumental variables.

...

currently ignored.

Value

model.matrix.systemfit returns a design matrix to estimate the specified system of equations.

model.matrix.systemfit.equation returns a design matrix to estimate the specified formula of the respective equation.

Author(s)

See Also

Examples

data( "Kmenta" )
eqDemand <- consump ~ price + income
eqSupply <- consump ~ price + farmPrice + trend
system <- list( demand = eqDemand, supply = eqSupply )

## perform OLS of the system
fitols <- systemfit( system, data = Kmenta )

## design matrix of the entire system
model.matrix( fitols )

## design matrix of the first equation
model.matrix( fitols$eq[[ 1 ]] )

systemfit

Estimating Systems of Simultaneous Equations

v1.1-24
GPL (>= 2)
Authors
Arne Henningsen and Jeff D. Hamann
Initial release
2019-12-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.