library( systemfit )
data( kmenta )
attach( kmenta )
demand <- q ~ p + d
supply <- q ~ p + f + a
labels <- list( "demand", "supply" )
system <- list( demand, supply )
## perform OLS on each of the equations in the system
fitols <- systemfit( "OLS", system, labels )
## print the results
print( fitols )
Run the code above in your browser using DataLab