function(qr, resid, w, s)
wt <- sqrt(w)
s <- s * wt
resid <- wt * resid
Rsw <- qr.resid(qr, s)
apply(Rsw^2 + 2 * s * resid, 2, sum)
Any scripts or data that you put into this service are public.
Add the following code to your website.
Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.