r - R 中使用 aov_ez 的混合模型方差分析(包:afex)
问题描述
我目前正在使用 afex 包中的 aov_ez 进行混合模型方差分析。该函数工作正常,我得到一个方差分析汇总表,但它给了我错误:
Univariate Type III Repeated-Measures ANOVA Assuming Sphericity
Sum Sq num Df Error SS den Df F value Pr(>F)
(Intercept) 3831173 1 4881918 15 11.7715 0.003714 **
group 89103 1 4881918 15 0.2738 0.608455
session 2287006 20 4214873 300 8.1391 < 2.2e-16 ***
group:session 821941 20 4214873 300 2.9251 4.083e-05 ***
type 817263 1 1438818 15 8.5201 0.010580 *
group:type 608 1 1438818 15 0.0063 0.937578
session:type 822818 20 2296312 300 5.3748 1.177e-11 ***
group:session:type 263515 20 2296312 300 1.7213 0.029307 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Warning message:
In summary.Anova.mlm(object$Anova, multivariate = FALSE) :
Singular error SSP matrix:
non-sphericity test and corrections not available
我使用的数据结构如下:
id session time group type
0 1 1 0.000 Control CS+
1 2 1 0.000 Control CS+
2 3 1 0.000 Control CS+
3 4 1 0.000 Control CS+
4 5 1 0.000 Control CS+
.. .. ... ... ... ...
205 13 21 202.875 Experimental CS-
206 14 21 0.000 Experimental CS-
207 15 21 75.250 Experimental CS-
208 16 21 0.000 Experimental CS-
209 17 21 0.000 Experimental CS-
[714 rows x 5 columns]
我使用的代码:
aov_ez("id", "time", data, between = c("group"), within = c("session", "type"),
anova_table=list(correction = "GG", es = "pes"), print.formula=T,
type=c("3"), check_contrasts=T,
return = c("afex_aov"))
是什么导致此错误消息?我怎样才能得到我的球形度测试结果和校正?我认为这与我有两组(因子之间)和两种类型(因子内)导致 Df 为 1 的事实有关,但我不确定。
预先感谢!
佩尔
解决方案
推荐阅读
- java - 按长度和字母顺序在行中打印单词
- python - Tensorflow model.save() -- NotImplementedError: 在 `__init__` 中有参数的层必须覆盖 `get_config`
- html - div 不支持两张图片
- javascript - Flow 制作自定义承诺类型
- html - 将中间的两个图像与相对两侧的文本对齐
- google-cloud-platform - Google Cloud - 无法从另一个 VPC 网络访问一个 VPC 网络中的私有 CloudSQL 数据库
- python - Cesar cipher 只打印出第一个字母
- powershell - 如何将多行字符串转换为对象或数组?
- powerbi - 如何解决 Power BI Dataflow 中的突然错误 500
- c++ - 我可以通过将其转换为 char* 来序列化一个类吗?