[英]2-way ANOVA with unbalance groups
Hi currently using R with the ez library to run 2-way ANOVA. 您好,目前在ez库中使用R来运行2向ANOVA。 I have a df as such: 我有这样的df:
Adult_Group Condition ID value
1 TS BaseLine CC8 3.549067
2 TS BaseLine BOB 3.518851
3 TS BaseLine 1910 3.432579
4 TS BaseLine cc80 3.542127
5 TS BaseLine 83d 3.555026
6 TS BaseLine 976c 3.514849
7 Control BaseLine hum2 3.533039
8 Control BaseLine ze8 3.435466
9 Control BaseLine 1177 3.365024
10 Control BaseLine jj89 3.584407
11 Control BaseLine 1811 3.439752
12 Control BaseLine 1812 3.356929
13 Control BaseLine ui77 3.288869
14 Control BaseLine 1816 3.421073
15 Control BaseLine hY89 3.445101
16 Control BaseLine ant3 3.527448
17 Control BaseLine zz890 3.651334
18 Control BaseLine 54e 3.733847
19 TS Drug CC8 19.477935
20 TS Drug BOB 19.493235
21 TS Drug 1910 19.552410
22 TS Drug cc80 19.462172
23 TS Drug 83d 19.524890
24 TS Drug 976c 19.459000
25 Control Drug hum2 19.567258
26 Control Drug ze8 19.450310
27 Control Drug 1177 19.609983
28 Control Drug jj89 19.698721
29 Control Drug 1811 19.459862
30 Control Drug 1812 19.605273
31 Control Drug ui77 19.369069
32 Control Drug 1816 19.523160
33 Control Drug hY89 19.648593
34 Control Drug ant3 19.417133
35 Control Drug zz890 19.547570
36 Control Drug 54e 19.5650688
I can use the ez library to run a 2-way ANOVA. 我可以使用ez库运行2向ANOVA。
A = ezANOVA(
data = temp
, dv = value
, wid = ID
, within = Condition
, between = Adult_Group
,return_aov=TRUE
, type = 3
)
This works very well but I'm wondering if there is another way to do this without the ez library, say with the lm function? 这很好用,但是我想知道如果没有ez库,是否还有另一种方法,例如使用lm函数?
thank you! 谢谢!
There is a built-in analysis of variance function, aov
. 有一个内置分析方差函数aov
。
Type ?aov
to access the help documentation. 键入?aov
以访问帮助文档。 Also, Quick-R has a pretty decent tutorial on it. 另外,Quick-R上还有不错的教程 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.