residuals.ols

0th

Percentile

Residuals for ols

Computes various residuals and measures of influence for a fit from ols.

Keywords
models, regression
Usage
## S3 method for class 'ols':
residuals(object, 
      type=c("ordinary", "score", "dfbeta", "dfbetas", 
             "dffit", "dffits", "hat", "hscore"), ...)
Arguments
object
object created by ols. Depending on type, you may have had to specify x=TRUE to ols.
type
type of residual desired. "ordinary" refers to the usual residual. "score" is the matrix of score residuals (contributions to first derivative of log likelihood). dfbeta and dfbetas mean respectively th
...
ignored
Value

  • a matrix or vector, with places for observations that were originally deleted by ols held by NAs

concept

model validation

See Also

lm.influence, ols, which.influence

Aliases
  • residuals.ols
Examples
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)
Documentation reproduced from package rms, version 2.0-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.