residuals.systemfit {systemfit}R Documentation

Residuals of systemfit object

Description

These functions extract the residuals from an object returned by systemfit.

Usage

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

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

Arguments

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

Value

residuals.systemfit returns a matrix of residuals. Each column contains the residuals of one equation.
residuals.systemfit.equation returns a vector of residuals.

Author(s)

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

See Also

systemfit, residuals

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 )

## residuals of all equations
residuals( fitols )

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

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

[Package systemfit version 0.8-0 Index]