从汽车包装中重复测量Anova调整自由度

时间:2014-07-25 14:04:03

标签: r

我正在使用汽车包运行重复测量ANOVA。哪个工作正常并返回类似于此的输出:

Univariate Type III Repeated-Measures ANOVA Assuming Sphericity

                SS num Df Error SS den Df        F    Pr(>F)    
(Intercept) 7260.0      1   603.33     15 180.4972 9.100e-10 ***
phase        167.5      2   169.17     30  14.8522 3.286e-05 ***
hour         106.3      4    73.71     60  21.6309 4.360e-11 ***
phase:hour    11.1      8   122.92    120   1.3525    0.2245    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 


Mauchly Tests for Sphericity

        Test statistic  p-value
phase             0.70470 0.086304
hour              0.11516 0.000718
phase:hour        0.01139 0.027376


Greenhouse-Geisser and Huynh-Feldt Corrections
for Departure from Sphericity

            GG eps Pr(>F[GG])    
phase      0.77202  0.0001891 ***
hour       0.49842  1.578e-06 ***
phase:hour 0.51297  0.2602357    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

现在它告诉我,在某些情况下,必须对球形度进行校正。据我所知,这种修正不仅会影响p值,还会影响自由度(df)。但是输出没有显示出来。那么如何显示调整后的df?

1 个答案:

答案 0 :(得分:1)

也许您已经解决了这个问题,但是要在Greenhouse-Geisser或Huynh-Feldt校正的情况下校正自由度,只需将每个自由度乘以相应的epsilon值即可。这是一个基于您的结果的示例:

# degrees of freedom for phase:hour
num_Df <- 8
den_Df <- 120

# Greenhouse-Geisser epsilon
gg_e <- 0.51297

# adjusted degrees of freedom
num_Df_adj <- gg_e * num_Df 
den_Df_adj <- gg_e * den_Df