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 )
## data used to estimate the entire system
model.frame( fitols )
## data used to estimate the first equation
model.frame( fitols$eq[[ 1 ]] )
Run the code above in your browser using DataLab