74 85161 po4 1 24491 19119 90688 opo4 1 28976 19164

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n 182 degrees of freedom Multiple R-squared: 0.5269,! Adjusted R-squared: 0.4879 F-statistic: 13.51 on 15 and 182 DF, p-value: < 2.2e-16 Statistics 503, Spring 2013, ISU 27 27 a1 = β0 + β1 mxPH + β2 mnO2 + β3 Cl + β4 NO3 + β5 NH4 + β6 PO4 + @/2%$.&.%#.%((/92 β7 Chla + τseason + τsize + τspeed + ε, ε ∼ N (0, σ 2 ) a1 = β0 + β1 mxPH + β2 mnO2 + β3 Cl + β4 NO3 + β5 NH4 + β6 oPO4 + β7 PO4 + β8 Chla + τseason + τsize + τspeed + ε, ε ∼ N (0, σ 2 ) Residual standard error: 1.012 on 182 degrees of freedom Multiple R-squared: 0.5269,! Adjusted R-squared: 0.4879 F-statistic: 13.51 on 15 and 182 DF, p-value: < 2.2e-16 BUT, model is not parsimonious... Statistics 503, Spring 2013, ISU 27 27 A/$#29()/'( b(c%"(<"*42#I(+$)2<$3*."#0";+(";+%) > algaet.diag <- data.frame(algaet.imp, dffits=dffits(lm.a1, lm.influence(lm.a1)), dfbeta=dfbeta(lm.a1, lm.influence(lm.a1)), CooksD=cooks.distance(lm.a1), hat=lm.influence(lm.a1)$hat) > ggobi(algaet.diag) Statistics 503, Spring 2013, ISU 28 28 A/$#29()/'( b(c%"(<"*42#I(+$)2<$3*."#0";+(";+%) > algaet.diag <- data.frame(algaet.imp, dffits=dffits(lm.a1, lm.influence(lm.a1)), dfbeta=dfbeta(lm.a1, lm.influence(lm.a1)), CooksD=cooks.distance(lm.a1), hat=lm.influence(lm.a1)$hat) > ggobi(algaet.diag) Statistics 503, Spring 2013, ISU Much better! 28 28 A/$#29()/'( b(c%"(<"*42#I(+$)2<$3*."#0";+(";+%) > algaet.diag <- data.frame(algaet.imp, dffits=dffits(lm.a1, lm.influence(lm.a1)), dfbeta=dfbeta(lm.a1, lm.influence(lm.a1)), CooksD=cooks.distance(lm.a1), hat=lm.influence(lm.a1)$hat) > ggobi(algaet.diag) Statistics 503, Spring 2013, ISU 28 28 -$./$0"%&(%"%')/92 > anova(lm.a1) Analysis of Variance Table Response: a1 Df season 3 size 2 speed 2 mxPH 1 mnO2 1 Sum Sq Mean Sq F value Pr(>F) 2.043 0.681 0.6656 0.574211 46.640 23.320 22.7920 1.468e-09 *** 27.779 13.890 13.5752 3.197e-06 *** 5.703 5.703 5.5741 0.019285 * 6.648 6.648 6.4975 0.011628 * Statistics 503, Spring 2013, ISU 29 29 -$./$0"%&(%"%')/92 > anova(lm.a1) Analysis of Variance Table Response: a1 Df season 3 size 2 speed 2 mxPH 1 mnO2 1 Season least important Sum Sq Mean Sq F value Pr(>F) 2.043 0.681 0.6656 0.574211 46.640 23.320 22.7920 1.468e-09 *** 27.779 13.890 13.5752 3.197e-06 *** 5.703 5.703 5.5741 0.019285 * 6.648 6.648 6.4975 0.011628 * Statistics 503, Spring 2013, ISU 29 29 -$./$0"%&(%"%')/92 > anova(lm.a1) Analysis of Variance Table Response: a1 Df season 3 size 2 speed 2 mxPH 1 mnO2 1 Season least important Sum Sq Mean Sq F value Pr(>F) 2.043 0.681 0.6656 0.574211 46.640 23.320 22.7920 1.468e-09 *** 27.779 13.890 13.5752 3.197e-06 *** 5.703 5.703 5.5741 0.019285 * 6.648 6.648 6.4975 0.011628 * Statistics 503, Spring 2013, ISU 29 29 -$./$0"%&(%"%')/92 > anova(lm.a1) Analysis of Variance Table Response: a1 Df season 3 size 2 speed 2 mxPH 1 mnO2 1 Sum Sq Mean Sq F value Pr(>F) 2.043 0.681 0.6656 0.574211 46.640 23.320 22.7920 1.468e-09 *** 27.779 13.890 13.5752 3.197e-06 *** 5.703 5.703 5.5741 0.019285 * 6.648 6.648 6.4975 0.011628 * Statistics 503, Spring 2013, ISU 29 29 -$./$0"%&(%"%')/92 > anova(lm.a1) Analysis of Variance Table Response: a1 Df season 3 size 2 speed 2 mxPH 1 mnO2 1 Sum Sq Mean Sq F value Pr(>F) 2.043 0.681 0.6656 0.574211 46.640 23.320 22.7920 1.468e-09 *** 27.779 13.890 13.5752 3.197e-06 *** 5.703 5.703 5.5741 0.019285 * 6.648 6.648 6.4975 0.011628 * Statistics 503, Spring 2013, ISU 29 29 -$./$0"%&(%"%')/92 > lm2.a1 <- update(lm.a1, . ~ . - season) > summary(lm2.a1) Statistics 503, Spring 2013, ISU 30 30 -$./$0"%&(%"%')/92 > lm2.a1 <- update(lm.a1, . ~ . - season) > summary(lm2.a1) Drop season Statistics 503, Spring 2013, ISU 30 30 -$./$0"%&(%"%')/92 > lm2.a1 <- update(lm.a1, . ~ . - season) > summary(lm2.a1) Drop season Statistics 503, Spring 2013, ISU 30 30 -$./$0"%&(%"%')/92 > lm2.a1 <- update(lm.a1, . ~ . - season) > summary(lm2.a1) Statistics 503, Spring 2013, ISU 30 30 -$./$0"%&(%"%')/92 > lm2.a1 <- update(lm.a1, . ~ . - season) > summary(lm2.a1) Statistics 503, Spring 2013, ISU 30 30 -$./$0"%&(%"%')/92 > lm2.a1 <- update(lm.a1, . ~ . - season) > summary(lm2.a1) Significant variables same, fit is almost exactly the same − season is not important. Statistics 503, Spring 2013, ISU 30 30 -$./$0"%&(%"%')/92 > lm2.a1 <- update(lm.a1, . ~ . - season) > summary(lm2.a1) Statistics 503, Spring 2013, ISU 30 30 -$./$0"%&(%"%')/92 R)"-,2$"*d) > final.lm <- step(lm.a1) Start: AIC=19.85 a1 ~ season + size + speed + mxPH + mnO2 + Cl + NO3 + NH4 + oPO4 + PO4 + Chla ... Step: AIC=8.52 a1 ~ size + speed + Cl + oPO4 + PO4 + Chla Df Sum of Sq RSS AIC <none> 188.74 8.5161 - PO4 1 2.4491 191.19 9.0688 - oPO4 1 2.8976 191.64 9.5327 - Cl 1 4...
View Full Document

Ask a homework question - tutors are online