View source: R/model.matrix.systemfit.R
model.matrix.systemfit | R Documentation |
These functions create design matrices from objects
returned by systemfit
.
## S3 method for class 'systemfit'
model.matrix( object, which = "x", ... )
## S3 method for class 'systemfit.equation'
model.matrix( object, which = "x", ... )
object |
an object of class |
which |
character string:
|
... |
currently ignored. |
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.
Arne Henningsen arne.henningsen@googlemail.com
systemfit
, model.matrix
, and
model.frame.systemfit
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 ]] )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.