Computed weighted residuals from a linear model fit.
weighted.residuals(obj, drop0 = TRUE)
R object, typically of class
Weighted residuals are based on the deviance residuals, which for
lm fit are the raw residuals Ri
multiplied by wi^0.5, where wi are the
weights as specified in
Dropping cases with weights zero is compatible with
influence and related functions.
Numeric vector of length n', where n' is the number of
of non-0 weights (
drop0 = TRUE) or the number of
## following on from example(lm) all.equal(weighted.residuals(lm.D9), residuals(lm.D9)) x <- 1:10 w <- 0:9 y <- rnorm(x) weighted.residuals(lmxy <- lm(y ~ x, weights = w)) weighted.residuals(lmxy, drop0 = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.