Last chance! 50% off unlimited learning
Sale ends in
threestage
.threestage.cov( results, eqni, eqnj )
threestage
threestage
objectsthreestage
objectsthreestage.cov
returns a submatrix from the variance-covariance
matrix from the variance-covariance matrix used for estimation during
3SLS.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 the estimation and report the results for the whoel system
fit3sls <- threestage.systemfit( system, inst, labels, kmenta )
print( fit3sls )
## get the variance-covariance matrix used for estimation
print( "covariance of residuals used for estimation (from 2sls)" )
print( threestage.cov( fit3sls, 1, 2 ) )
Run the code above in your browser using DataLab