[R] Error mean square

Murray Jorgensen maj at waikato.ac.nz
Wed Sep 19 05:28:38 CEST 2001


At 06:56 AM 18-09-01 +0100, Prof Brian D Ripley wrote:
>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
>
>summary(rb.lm)$sigma^2
>
>or
>
>deviance(rb.lm)/df.residual(rb.lm)

I know that I didn't ask questions of efficiency, but these two are slower
than
my proposal, especially the one calling summary.

>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.

I can't believe that you have never heard the term `error mean square'. Do you
mean that you find it ambiguous, or that it is to be deprecated for some
reason?


Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html 
Department of Statistics, University of Waikato, Hamilton, New Zealand 
Email: maj at waikato.ac.nz                            Fax +64-7 838 4155
Phone +64-7 838 4773 home phone +64-7 856 6705  Mobile +64-21 139 5862

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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