
sur.systemfit( eqns, instruments, eqnlabels, data )
sur
returns a list of objects of class sur
, with the following components:ols
,twostage
,sur
and threestage
library( systemfit )
data( kmenta )
attach( kmenta )
demand <- q ~ p + d
supply <- q ~ p + f + a
inst <- ~ d + f + a
labels <- list( "demand", "supply" )
system <- list( demand, supply )
## perform SUR on each of the equations in the system
fitsur <- sur.systemfit( system, inst, labels, kmenta )
print( fitsur )
print( "covariance of residuals" )
print( varcov.systemfit( fitsur ) )
Run the code above in your browser using DataLab