X.residuals: Residuals from the regression of each column of a
data.frame against all the other columns.
Description
Calculate the residuals from the regression of each column of a
data.frame against all the other columns.
Usage
X.residuals(x, ...)
# S3 method for default
X.residuals(x, y.name, na.action = na.exclude, ...) ## x is a data.frame
# S3 method for formula
X.residuals(x, data, na.action = na.exclude, ...) ## x is a formula
# S3 method for lm
X.residuals(x, na.action = na.exclude, ...) ## x is a "lm" object computed with x=TRUE
Arguments
x
data.frame, or formula, or lm object
computed with x=TRUE.
na.action
See
…
additional arguments.
y.name
Name of Y-variable to be excluded from the computations.
data
A data frame in which the variables specified in the
formula will be found. If missing, the variables are searched for in
the standard way.
Value
Data.frame of residuals, one column from each regression.
References
Heiberger, Richard M. and Holland, Burt (2015).
Statistical Analysis and Data Display: An Intermediate Course with Examples in R.
Second Edition.
Springer-Verlag, New York.
https://link.springer.com/us/book/9781493921218