A generic function for computing the recursive residuals
(standardized one step prediction errors) of a linear regression model.
Usage
## S3 method for class 'default':
recresid(x, y, \dots, tol = 1e-7)
## S3 method for class 'formula':
recresid(formula, data = list(), ..., tol = 1e-7)
## S3 method for class 'lm':
recresid(x, data = list(), ..., tol = 1e-7)
Arguments
x, y, formula
specification of the linear regression model:
either by a regressor matrix x and a response variable y,
or by a formula or by a fitted object x of class "lm".
data
an optional data frame containing the variables in the model. By
default the variables are taken from the environment which recresid is
called from. Specifying data might also be necessary when applying
recre
...
currently not used.
tol
tolerance when solve is used.
Value
A vector containing the recursive residuals.
Details
Under the usual assumptions for the linear regression model the
recdursive residuals are (asymptotically) normal and
i.i.d. (see Brown, Durbin, Evans (1975) for details).
References
Brown R.L., Durbin J., Evans J.M. (1975), Techniques for
testing constancy of regression relationships over time, Journal of the
Royal Statistal Society, B, 37, 149-163.