Learn R Programming

systemfit (version 0.7-3)

predict.systemfit.equation: Predictions from Equation System Estimation

Description

Returns the predicted values.

Usage

## S3 method for class 'systemfit.equation':
predict( object, data, ... )

Arguments

object
an object of type systemfit.equation.
data
data frame in which to predict.
...
additional optional arguments.

Value

  • predict.systemfit.equation returns a vector of the predicted values.

See Also

systemfit, predict.systemfit and predict

Examples

Run this code
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