如何解决lm.fitx,y,偏移=偏移,singular.ok = singular.ok,...中的错误:重复测量方差分析中为0非NA
我一直在遇到相同的错误,一次又一次尝试使用rstatix包中的anova_test做一种重复测量ANOVA的方法。这是我的数据 https://github.com/gyrusrectus/stackquery/blob/master/s2.csv和代码
anova_test(data=s2,dv = mean_score,wid = id,within = station)
我想比较三个不同任务工作站上候选人的平均分数。请帮忙。
解决方法
这似乎是anova_test
中的错误。如果数据框包含模型中未包含的变量,则会引发错误。如果将它们放下,它将按预期工作:
s2 <- read.csv("https://raw.githubusercontent.com/gyrusrectus/stackquery/master/s2.csv")
s2 <- s2[,c(1,2,7)]
anova_test(data = s2,dv = mean_score,wid = cand_id,within = station)
#>
#> ANOVA Table (type III tests)
#>
#> $ANOVA
#> Effect DFn DFd F p p<.05 ges
#> 1 station 2 42 8.8 0.000643 * 0.157
#>
#> $`Mauchly's Test for Sphericity`
#> Effect W p p<.05
#> 1 station 0.859 0.219
#>
#> $`Sphericity Corrections`
#> Effect GGe DF[GG] p[GG] p[GG]<.05 HFe DF[HF] p[HF] p[HF]<.05
#> 1 station 0.876 1.75,36.81 0.001 * 0.95 1.9,39.89 0.000819 *
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。