Guest User

Untitled

a guest
Jan 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. r <- residuals(x) # <--- r contains residuals
  2.  
  3. ...
  4.  
  5. if (any(show[2L:6L])) {
  6. s <- if (inherits(x, "rlm"))
  7. x$s
  8. else if (isGlm)
  9. sqrt(summary(x)$dispersion)
  10. else sqrt(deviance(x)/df.residual(x)) #<---- value of s
  11. hii <- lm.influence(x, do.coef = FALSE)$hat #<---- value of hii
  12.  
  13. ...
  14.  
  15. r.w <- if (is.null(w))
  16. r #<-- r.w for unweighted regression
  17. else sqrt(w) * r
  18. rs <- dropInf(r.w/(s * sqrt(1 - hii)), hii) # <-- std. residual in plots
Add Comment
Please, Sign In to add comment