Learn R Programming

systemfit (version 0.7-1)

se.ratio.systemfit: Ratio of the Standard Errors

Description

se.ratio.systemfit returns a vector of the ratios of the standard errors of the predictions for two equations.

Usage

se.ratio.systemfit( resultsi, resultsj, eqni )

Arguments

resultsi
an object of type systemfit.system.
resultsj
an object of type systemfit.system.
eqni
index for equation to obtain the ratio of standard errors.

Value

  • se.ratio returns a vector of the standard errors of the ratios for the predictions between the predicted values in equation i and equation j.

References

Hasenauer, H; Monserud, R and T. Gregoire. (1998) Using Simultaneous Regression Techniques with Individual-Tree Growth Models. Forest Science. 44(1):87-95

See Also

systemfit and correlation.systemfit

Examples

Run this code
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 2SLS on each of the equations in the system
fit2sls <- systemfit( "2SLS", system, labels, inst )
fit3sls <- systemfit( "3SLS", system, labels, inst )

## print the results from the fits
print( fit2sls )
print( fit3sls )
print( "covariance of residuals used for estimation (from 2sls)" )
print( fit3sls$rcovest )
print( "covariance of residuals" )
print( fit3sls$rcov )

## examine the improvement of 3SLS over 2SLS by computing
## the ratio of the standard errors of the estimates
improve.ratio <- se.ratio.systemfit( fit2sls, fit3sls, 2 )
print( "summary values for the ratio in the std. err. for the predictions" )
print( summary( improve.ratio ) )

Run the code above in your browser using DataLab