View source: R/residuals.ols.s
residuals.ols | R Documentation |
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", "influence.measures",
"studentized"), ...)
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 NA
s
Frank Harrell
Department of Biostatistics
Vanderbilt University
fh@fharrell.com
lm.influence
, ols
,
which.influence
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)
i <- resid(f, 'influence.measures') # dfbeta, dffit, etc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.