fitted.systemfit {systemfit}R Documentation

Fitted values

Description

These functions extract the fitted values from an object returned by systemfit.

Usage

   ## S3 method for class 'systemfit':
   fitted( object, ... )

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

Arguments

object an object of class systemfit or systemfit.equation.
... other arguments.

Value

fitted.systemfit returns a vector of all fitted values.
fitted.systemfit.equation returns a vector of the fitted values of a single equation.

Author(s)

Arne Henningsen ahenningsen@agric-econ.uni-kiel.de

See Also

systemfit, fitted

Examples

data( "Kmenta" )
demand <- consump ~ price + income
supply <- consump ~ price + farmPrice + trend
labels <- list( "demand", "supply" )
system <- list( demand, supply )

## perform OLS on each of the equations in the system
fitols <- systemfit( "OLS", system, labels, data = Kmenta )

## all fitted values
fitted( fitols )

## fitted values of the first equation
fitted( fitols$eq[[1]] )

## fitted values of the second equation
fitted( fitols$eq[[2]] )

[Package systemfit version 0.8-0 Index]