data( "Kmenta" )
eqDemand <- consump ~ price + income
eqSupply <- consump ~ price + farmPrice + trend
inst <- ~ income + farmPrice + trend
system <- list( demand = eqDemand, supply = eqSupply )
## perform OLS on each of the equations in the system
fitols <- systemfit( system, data = Kmenta )
## results of the system
summary( fitols )
## short results of the system
summary( fitols, residCov = FALSE, equations = FALSE )
## results of the first equation
summary( fitols$eq[[1]] )
## results of the second equation
summary( fitols$eq[[2]] )
Run the code above in your browser using DataLab