[R] Error mean square

Prof Brian D Ripley ripley at stats.ox.ac.uk
Tue Sep 18 07:56:04 CEST 2001

On Tue, 18 Sep 2001, Murray Jorgensen wrote:

> If rb.lm is an lm-object, I can access the error mean square as
> s2 <- sum(rb.lm$residuals^2)/rb.lm$df.residual
> This seems a bit like hard work for such a commonly wanted quantity. Is
> there a better way to do this?

For a model without weights




BTW, I don't really know what you mean by `error mean square' (I would say
`residual mean square'), but suspect that when weights are involved you
want the weighted form which each of these compute.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list