2014-02-07 30 views
0

嗨目前使用R中的EZ庫運行2路ANOVA不平衡組。我有一個DF這樣:2路ANOVA與

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 

我可以使用EZ庫運行2因素方差分析。

A = ezANOVA(
    data = temp 
    , dv = value 
    , wid = ID 
    , within = Condition 
    , between = Adult_Group 
    ,return_aov=TRUE 
    , type = 3 
) 

這工作得很好,但我想知道是否有另一種方法來做到這一點,沒有ez庫,用lm函數說?

謝謝!

回答

0

有變化的功能,aov的內置的分析。

類型?aov訪問幫助文檔。另外,Quick-R上有一個pretty decent tutorial