R- 重复测量方差分析的偏 eta 平方(汽车包装) [英] R- Partial eta squared for repeated measures ANOVA (car package)

查看:116
本文介绍了R- 重复测量方差分析的偏 eta 平方(汽车包装)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 2 路重复测量设计 (3 x 2),我想弄清楚如何计算效果大小(部分 eta 平方).

I have a 2-way repeated measures design (3 x 2), and I would like to get figures out how to calculate effect sizes (partial eta squared).

我有一个包含数据的矩阵(称为 a),就像这样(重复测量)

I have a matrix with data in it (called a) like so (repeated measures)

         A.a          A.b           B.a        B.b          C.a           C.b
1        514.0479     483.4246      541.1342   516.4149     595.5404      588.8000
2        569.0741     550.0809      569.7574   599.1509     621.4725      656.8136
3        738.2037     660.3058      812.2970   735.8543     767.0683      738.7920
4        627.1101     638.1338      641.2478   682.7028     694.3569      761.6241
5        599.3417     637.2846      599.4951   632.5684     626.4102      677.2634
6        655.1394     600.9598      729.3096   669.4189     728.8995      716.4605

idata =

    Caps    Lower
       A       a
       A       b
       B       a
       B       b
       C       a
       C       b

我知道如何对汽车包装进行重复测量方差分析(类型 3 SS 在我的领域是标准的,尽管我知道这会导致逻辑错误..如果有人想像我 5 岁那样向我解释这一点我很想理解它):

I know how to do a repeated measures ANOVA with the car package (type 3 SS is standard in my field although I know that it results in a logical error.. if somebody wants to explain that to me like I'm 5 I would love to understand it):

summary(Anova(lm(a ~ 1),
          idata=idata,type=3, 
          idesign=~Caps*Lower)),
    multivariate=FALSE)

我想我想做的是把这部分摘要打印出来:

I think what I want to do is take this part of the summary print out:

假设球形的单变量 III 型重复测量方差分析

Univariate Type III Repeated-Measures ANOVA Assuming Sphericity

                     SS num Df Error SS den Df        F    Pr(>F)    
(Intercept)     14920141     1   153687      5 485.4072 3.577e-06 ***
Caps            33782        2     8770     10  19.2589  0.000372 ***
Lower           195          1    13887      5   0.0703  0.801451    
Caps:Lower      2481         2      907     10  13.6740  0.001376 ** 

并用它来计算部分 ETA 平方.所以,如果我没记错的话,我需要从第一列中取出 SS 并将其除以(它本身 + 该行的 SS 误差)为每个效果.这是正确的方法吗?如果是这样,我该怎么做?我不知道如何从总结打印出来的参考值.

And use it to calculate partial ETA squared. So, if I'm not mistaken, I need to take the SS from the first column and divide it by (itself + SS Error for that row) for each effect. Is this the correct way to go about it? If so, how do I do it? I can't figure out how to reference values from the summary print out.

推荐答案

部分 eta 平方可以使用 heplots 包中的 etasq 函数计算

The partial eta-squared can be calculated with the etasq function in heplots package

library(car)
mod <- Anova(lm(a ~ 1),
idata = idata,
type = 3,
idesign = ~Caps*Lower)

mod

library(heplots)
etasq(mod, anova = TRUE)

既然你问的是计算:
来自 ?etasq:'对于单变量线性模型,经典 η^2 = SSH/SST 和部分 η^2 = SSH/(SSH + SSE).这些在单向设计中是相同的.'.

Since you are asking about the calculations:
From ?etasq: 'For univariate linear models, classical η^2 = SSH / SST and partial η^2 = SSH / (SSH + SSE). These are identical in one-way designs.'.

如果你想检查一个带有 class 的模型的 η^2 计算代码,你可以使用 getS3method(f = "etasq", class= "Anova.mlm").

If you wish to inspect the code for the calculations of η^2 for a model with a class as in the example, you may use getS3method(f = "etasq", class = "Anova.mlm").

这篇关于R- 重复测量方差分析的偏 eta 平方(汽车包装)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆