Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r <- residuals(x) # <--- r contains residuals
- ...
- if (any(show[2L:6L])) {
- s <- if (inherits(x, "rlm"))
- x$s
- else if (isGlm)
- sqrt(summary(x)$dispersion)
- else sqrt(deviance(x)/df.residual(x)) #<---- value of s
- hii <- lm.influence(x, do.coef = FALSE)$hat #<---- value of hii
- ...
- r.w <- if (is.null(w))
- r #<-- r.w for unweighted regression
- else sqrt(w) * r
- rs <- dropInf(r.w/(s * sqrt(1 - hii)), hii) # <-- std. residual in plots
Add Comment
Please, Sign In to add comment