residuals.systemfit | R Documentation |
These functions extract the residuals
from an object returned by
systemfit
.
## S3 method for class 'systemfit'
residuals( object, ... )
## S3 method for class 'systemfit.equation'
residuals( object, na.rm = FALSE, ... )
object |
an object of class |
na.rm |
a logical value indicating whether |
... |
other arguments. |
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.
Arne Henningsen arne.henningsen@googlemail.com
systemfit
, residuals
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]] )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.