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
http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf
Max
----------------------------------------------------------------------
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.