library( systemfit )
data( kmenta )
demand <- q ~ p + d
supply <- q ~ p + f + a
labels <- list( "demand", "supply" )
system <- list( demand, supply )
## OLS estimation
fitols <- systemfit("OLS", system, labels, data=kmenta )
## print the predicted values of the first equation
predict( fitols$eq[[1]] )
## print the predicted values of the second equation
predict( fitols$eq[[2]] )
Run the code above in your browser using DataLab