Residuals for ols
Computes various residuals and measures of influence for a
fit from ols.
## S3 method for class 'ols'
residuals(object,
type=c("ordinary", "score", "dfbeta", "dfbetas",
"dffit", "dffits", "hat", "hscore"), ...)object |
object created by |
type |
type of residual desired. |
... |
ignored |
a matrix or vector, with places for observations that were originally
deleted by ols held by NAs
Frank Harrell
Department of Biostatistics
Vanderbilt University
fh@fharrell.com
set.seed(1) x1 <- rnorm(100) x2 <- rnorm(100) x1[1] <- 100 y <- x1 + x2 + rnorm(100) f <- ols(y ~ x1 + x2, x=TRUE, y=TRUE) resid(f, "dfbetas") which.influence(f)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.