Jim Milks
2005-May-01 19:42 UTC
[R] Partial F-test comparing full and reduced regression models
Dear all: I have a regression model that has collinearity problems (between three regressor variables). I need a F-test that will allow me to compare between full (with all variables) and partial models (minus 1=< variables). The general F-test formula I'm using is: F = {[SS(full model) - SS(reduced model)] / (#variables taken out)} / MSS(full model) Unfortunately, the ANOVA table parses the SS and MSS between the variables and does not give the statistics for the regression model as a whole, otherwise I'd do this by hand. So, really, I have two questions: 1) Can I just add up all the SS and MSS for all the variables to get the model SS and MSS and 2) Are there any functions or packages I can use to calculate the F-statistic? Thank you for any help you can provide. Sincerely, Jim Milks Graduate Student Environmental Sciences Ph.D. Program Wright State University 3640 Colonel Glenn Hwy Dayton, OH 45435
Peter Dalgaard
2005-May-01 19:52 UTC
[R] Partial F-test comparing full and reduced regression models
Jim Milks <jrclmilks at joimail.com> writes:> Dear all: > > I have a regression model that has collinearity problems (between > three regressor variables). I need a F-test that will allow me to > compare between full (with all variables) and partial models (minus > 1=< variables). The general F-test formula I'm using is: > > F = {[SS(full model) - SS(reduced model)] / (#variables taken out)} / > MSS(full model) > > Unfortunately, the ANOVA table parses the SS and MSS between the > variables and does not give the statistics for the regression model as > a whole, otherwise I'd do this by hand. > > So, really, I have two questions: 1) Can I just add up all the SS and > MSS for all the variables to get the model SS and MSS and 2) Are > there any functions or packages I can use to calculate the F-statistic?Just use anova(model1, model2). (One potential catch: Make sure that both models are fitted to the same data set. Missing values in predictors may interfere.) -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907