240 likes | 387 Views
ANOVA ANALYSIS. Eighth-Grade Pupils in the Netherlands. 第八組. 494310085 宋汶達 494310217 孫偉傑 494310425 陳盈志 494310463 徐健豪 494310504 朱明興. Eighth-Grade Pupils in the Netherlands. Description
E N D
ANOVA ANALYSIS Eighth-Grade Pupils in the Netherlands
第八組 • 494310085 宋汶達 • 494310217 孫偉傑 • 494310425 陳盈志 • 494310463 徐健豪 • 494310504 朱明興
Eighth-Grade Pupils in the Netherlands • Description • Snijders and Bosker (1999) use as a running example a study of 2287 eighth-grade pupils (aged about 11) in 132 classes in 131 schools in the Netherlands. Only the variables used in our examples are supplied. • Usage • nlschools • Format • This data frame contains 2287 rows and the following columns: • lang • language test score. • IQ • verbal IQ. • class • class ID. • GS • class size: number of eighth-grade pupils recorded in the class (there may be others: see COMB, and some may have been omitted with missing values). • SES • social-economic status of pupil's family. • COMB • were the pupils taught in a multi-grade class (0/1)? Classes which contained pupils from grades 7 and 8 are coded 1, but only eighth-graders were tested.
We set IQ for 3 levels Level 1. 4~ 9.5 Level 2. 10~13.5 Level 3. 14~18 We set SES for 3 levels Level 1. 10 ~ 17 Level 2. 18 ~ 38 Level 3. 39 ~ 50 Levels • We set COMB for 2 levels • Level 1. 0 N • Level 2. 1 Y
假設 • 虛無假設:IQ對於lang 沒有顯著差異 • 對立假設:IQ對於lang 有顯著差異
IQ的ANOVA TABLE • Analysis of Variance Table • Response: lang • Df Sum Sq Mean Sq F value Pr(>F) • IQ 2 49686 24843 418.35 < 2.2e-16 *** • Residuals 2284 135631 59 • --- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
IQ的迴歸式 • Call: • lm(formula = lang ~ IQ) • Residuals: • Min 1Q Median 3Q Max • -27.1115 -5.1115 0.8885 5.6154 21.6154 • Coefficients: • Estimate Std. Error t value Pr(>|t|) • (Intercept) 31.3846 0.4363 71.94 <2e-16 *** • IQII 9.7268 0.4761 20.43 <2e-16 *** • IQIII 17.4195 0.6033 28.87 <2e-16 *** • --- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 • Residual standard error: 7.706 on 2284 degrees of freedom • Multiple R-squared: 0.2681, Adjusted R-squared: 0.2675 • F-statistic: 418.3 on 2 and 2284 DF, p-value: < 2.2e-16
假設 • 虛無假設:SES對於lang 沒有顯著差異 • 對立假設:SES對於lang 有顯著差異
SES的ANOVA TABLE • Analysis of Variance Table • Response: lang • Df Sum Sq Mean Sq F value Pr(>F) • SES 2 18946 9473 130.05 < 2.2e-16 *** • Residuals 2284 166371 73 • --- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
SES的迴歸式 • Call: • lm(formula = lang ~ SES) • Residuals: • Min 1Q Median 3Q Max • -31.684 -5.684 1.202 6.316 23.202 • Coefficients: • Estimate Std. Error t value Pr(>|t|) • (Intercept) 34.7978 0.5223 66.62 <2e-16 *** • SESB 5.8859 0.5655 10.41 <2e-16 *** • SESC 10.4715 0.6546 16.00 <2e-16 *** • --- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 • Residual standard error: 8.535 on 2284 degrees of freedom • Multiple R-squared: 0.1022, Adjusted R-squared: 0.1015 • F-statistic: 130.1 on 2 and 2284 DF, p-value: < 2.2e-16
假設 • 虛無假設:COMB對於lang 沒有顯著差異 • 對立假設:COMB對於lang 有顯著差異
COMB的ANOVA TABLE • Analysis of Variance Table • Response: lang • Df Sum Sq Mean Sq F value Pr(>F) • COMB 1 2678 2678 33.501 8.1e-09 *** • Residuals 2285 182640 80 • --- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
COMB的迴歸式 • Call: • lm(formula = lang ~ COMB) • Residuals: • Min 1Q Median 3Q Max • -30.178 -6.178 0.822 7.399 18.822 • Coefficients: • Estimate Std. Error t value Pr(>|t|) • (Intercept) 41.6013 0.2196 189.472 < 2e-16 *** • COMBY -2.4233 0.4187 -5.788 8.1e-09 *** • --- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 • Residual standard error: 8.94 on 2285 degrees of freedom • Multiple R-squared: 0.01445, Adjusted R-squared: 0.01402 • F-statistic: 33.5 on 1 and 2285 DF, p-value: 8.1e-09
交互影響 • 虛無假設:IQ與SES的交互作用 對於lang 沒有顯著差異 • 對立假設:IQ與SES對於lang 有顯著差異 • 虛無假設:IQ與COMB的交互作用 對於lang 沒有顯著差異 • 對立假設:IQ與COMB對於lang 有顯著差異 • 虛無假設:SES與COMB的交互作用 對於lang 沒有顯著差異 • 對立假設:SES與COMB對於lang 有顯著差異
ANOVA TABLE • > anova(lm(lang~IQ*SES*COMB)) • Analysis of Variance Table • Response: lang • Df Sum Sq Mean Sq F value Pr(>F) • IQ 2 49686 24843 452.2850 < 2.2e-16 *** • SES 2 7710 3855 70.1861 < 2.2e-16 *** • COMB 1 1981 1981 36.0686 2.212e-09 *** • IQ:SES 4 107 27 0.4872 0.745171 • IQ:COMB 2 790 395 7.1880 0.000773 *** • SES:COMB 2 6 3 0.0545 0.946954 • IQ:SES:COMB 4 407 102 1.8506 0.116498 • Residuals 2269 124631 55 • --- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0--- • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0
進階分析-1 • > TukeyHSD(aov(lm(lang~IQ))) • Tukey multiple comparisons of means • 95% family-wise confidence level • Fit: aov(formula = lm(lang ~ IQ)) • $IQ • diff lwr upr p adj • II-I 9.726836 8.610211 10.843461 0 • III-I 17.419478 16.004608 18.834348 0 • III-II 7.692642 6.617922 8.767363 0
進階分析-2 • > TukeyHSD(aov(lm(lang~SES))) • Tukey multiple comparisons of means • 95% family-wise confidence level • Fit: aov(formula = lm(lang ~ SES)) • $SES • diff lwr upr p adj • B-A 5.885881 4.559735 7.212027 0 • C-A 10.471478 8.936361 12.006595 0 • C-B 4.585597 3.530036 5.641158 0
進階分析-3 • > TukeyHSD(aov(lm(lang~COMB))) • Tukey multiple comparisons of means • 95% family-wise confidence level • Fit: aov(formula = lm(lang ~ COMB)) • $COMB • diff lwr upr p adj • Y-N -2.423266 -3.244276 -1.602257 0