
systemfit
.
"model.matrix"( object, which = "x", ... )
"model.matrix"( object, which = "x", ... )
systemfit
or
systemfit.equation
."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.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.
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 ]] )
Run the code above in your browser using DataLab