residuals.systemfit: Residuals of systemfit object

View source: R/smallMethods.R

residuals.systemfitR 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, na.rm = FALSE, ... )

Arguments

object

an object of class systemfit or systemfit.equation.

na.rm

a logical value indicating whether NA values (corresponding to observations that were not included in the estimation) should be removed from the vector of residuals before it is returned.

...

other arguments.

Value

residuals.systemfit returns a data.frame of residuals, where each column contains the residuals of one equation.

residuals.systemfit.equation returns a vector of residuals.

Author(s)

Arne Henningsen arne.henningsen@googlemail.com

See Also

systemfit, residuals

Examples

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

## perform OLS on each of the equations in the system
fitols <- systemfit( system, 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]] )

systemfit documentation built on March 31, 2023, 9:26 p.m.