Re: [R] Compare effects between lm-models

From: Kuhn, Max <>
Date: Mon 22 Jan 2007 - 15:26:54 GMT

You can use the anova function a la:

> anova(model1, model2)
   Analysis of Variance Table    

   Model 1: y ~ x
   Model 2: y ~ x + z

     Res.Df    RSS Df Sum of Sq      F Pr(>F)
   1     13 4.4947                           
   2     12 4.4228  1    0.0720 0.1952 0.6665

I would suggest getting a copy of MASS and/or reading


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}} mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue Jan 23 02:37:39 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 22 Jan 2007 - 17:30:32 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.