在R中设置ANOVA的对比度 [英] Setting Contrasts for ANOVA in R

查看:121
本文介绍了在R中设置ANOVA的对比度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在尝试在附加的数据帧上用R执行ANOVA.

I've been attempting to perform an ANOVA in R recently on the attached data frame.

我的问题围绕对比的设置.

My question revolves around the setting of contrasts.

我的设计是3x5的主题内设计.

My design is a 3x5 within-subjects design.

"Circle1"下有3种视觉条件,"Beep1"下有5种音频.

There are 3 visual conditions under 'Circle1' and 5 audio under 'Beep1'.

有人知道我应该如何设置对比度吗?这是我不熟悉的事情,因为我正在进行从SPSS中的指向和单击状态转换为R中的编码.

Does anyone have any idea how I should set the contrasts? This is something I'm unfamiliar with as I'm making the transition from point and click stats in SPSS to coded in R.

感谢您的时间

数据文件:

推荐答案

从另一个

Reiterating my answer from another stackoverflow question that was flagged as similar, since you didn't provide any code, you might start by having a look at the contrast package in R. As they note in the document:

对比度包的目的是提供一个标准接口,用于测试常见回归模型中参数的线性组合.语法模仿了对比度.来自设计库的设计功能.对比度类已在此包中扩展为使用lm,glm,gls,lme和geese函数生成的线性模型."

"The purpose of the contrast package is to provide a standardized interface for testing linear combinations of parameters from common regression models. The syntax mimics the contrast. Design function from the Design library. The contrast class has been extended in this package to linear models produced using the functions lm, glm, gls, lme and geese."

这里还有一个很好的小教程,由 Dr.威廉·金(William King)讨论了对象方差分析之间的阶乘,还包括大量的R代码.这比您提出的问题范围更广,但是将是一个很好的起点(只是为了获得上下文).

There is also a nice little tutorial here by Dr. William King who talks about factorial between subjects ANOVA and also includes an abundance of R code. This is wider scoped than you question but would be a great place to start (just to get context).

最后,这是另一个资源,您可以在

Finally, here is another resource that you can refer to which talks about setting up orthogonal contrasts in R.

这篇关于在R中设置ANOVA的对比度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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