> # Some examples of ANOVA tables and F-testing > #################################################################### > names(prestige) [1] "education" "income" "pct.female" "occ.prestige" "occ.code" [6] "occ.type" > #################################################################### > summary(lm(occ.prestige ~ occ.type + education + income + pct.female, + data=prestige)) Call: lm(formula = occ.prestige ~ occ.type + education + income + pct.female, data = prestige) Residuals: Min 1Q Median 3Q Max -17.85 -4.883 -0.02936 5.516 18.86 Coefficients: Value Std. Error t value Pr(>|t|) (Intercept) 0.7008 6.7909 0.1032 0.9180 occ.type1 0.9833 2.0318 0.4839 0.6295 occ.type2 2.3742 1.3431 1.7677 0.0803 occ.type3 -0.9597 0.5650 -1.6986 0.0927 education 3.4513 0.6572 5.2513 0.0000 income 0.0012 0.0003 4.3745 0.0000 pct.female 0.0062 0.0310 0.1995 0.8423 Residual standard error: 7.586 on 95 degrees of freedom Multiple R-Squared: 0.8171 F-statistic: 70.74 on 6 and 95 degrees of freedom, the p-value is 0 Correlation of Coefficients: (Intercept) occ.type1 occ.type2 occ.type3 education income occ.type1 -0.2768 occ.type2 0.7170 0.3020 occ.type3 0.1227 0.4329 0.3328 education -0.9305 0.1929 -0.7001 -0.1327 income 0.0719 -0.1636 -0.0933 0.0081 -0.3789 pct.female -0.1623 -0.0156 -0.1420 -0.2873 -0.1071 0.5237 > anova(lm(occ.prestige ~ occ.type + education + income + pct.female, + data=prestige)) Analysis of Variance Table Response: occ.prestige Terms added sequentially (first to last) Df Sum of Sq Mean Sq F Value Pr(F) occ.type 3 19475.22 6491.739 112.7921 0.0000000 education 1 3504.18 3504.182 60.8842 0.0000000 income 1 1446.02 1446.022 25.1242 0.0000025 pct.female 1 2.29 2.291 0.0398 0.8423002 Residuals 95 5467.72 57.555 > #################################################################### > anova(lm(occ.prestige ~ education + income + pct.female + occ.type, + data=prestige)) Analysis of Variance Table Response: occ.prestige Terms added sequentially (first to last) Df Sum of Sq Mean Sq F Value Pr(F) education 1 21608.44 21608.44 375.4404 0.0000000 income 1 2248.14 2248.14 39.0608 0.0000000 pct.female 1 5.28 5.28 0.0917 0.7626279 occ.type 3 565.85 188.62 3.2772 0.0243745 Residuals 95 5467.72 57.55 > ################################################################### > anova(lm(occ.prestige ~ pct.female + education + income + occ.type, + data=prestige)) Analysis of Variance Table Response: occ.prestige Terms added sequentially (first to last) Df Sum of Sq Mean Sq F Value Pr(F) pct.female 1 418.63 418.63 7.2735 0.00827981 education 1 22066.52 22066.52 383.3995 0.00000000 income 1 1376.71 1376.71 23.9200 0.00000408 occ.type 3 565.85 188.62 3.2772 0.02437453 Residuals 95 5467.72 57.55