User Tools

Site Tools


r:oneway_anova

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
r:oneway_anova [2020/10/12 16:33] hkimscilr:oneway_anova [2020/10/12 16:36] hkimscil
Line 1: Line 1:
 ====== Oneway ANOVA ====== ====== Oneway ANOVA ======
 +===== data =====
 | (온도조건)x1  | 50.5  | 52.1  | 51.9  | 52.4  | 50.6  | 51.4  | 51.2  | 52.2  | 51.5  | 50.8  | | (온도조건)x1  | 50.5  | 52.1  | 51.9  | 52.4  | 50.6  | 51.4  | 51.2  | 52.2  | 51.5  | 50.8  |
 | (온도조건)x2  | 47.5  | 47.7  | 46.6  | 47.1  | 47.2  | 47.8  | 45.2  | 47.4  | 45.0  | 47.9  | | (온도조건)x2  | 47.5  | 47.7  | 46.6  | 47.1  | 47.2  | 47.8  | 45.2  | 47.4  | 45.0  | 47.9  |
Line 160: Line 161:
 30  46.2   hi 30  46.2   hi
 </code> </code>
 +===== ANOVA by hand =====
 <code> <code>
 mean.by.group.xs <- tapply(xs$score, xs$temp, mean) mean.by.group.xs <- tapply(xs$score, xs$temp, mean)
Line 280: Line 281:
  
 </code> </code>
 +===== ANOVA function (aov) =====
  
 <code> <code>
Line 322: Line 324:
  
 > </code> > </code>
- 
-<code>> tapply(xs$values, xs$ind, mean) 
-   x1    x2    x3  
-51.46 46.94 46.35 </code> 
- 
- 
-SS<sub>between</sub> 
-<code>> meanxs <- mean(xs$values) 
-> mx1 <- mean(x1) 
-> mx2 <- mean(x2) 
-> mx3 <- mean(x3) 
- 
-> x2ss <- 10*((meanxs - mx2)^2) 
-> x3ss <- 10*((meanxs - mx3)^2) 
-> x1ss <- 10*((meanxs - mx1)^2) 
-> xss <- x1ss+x2ss+x3ss 
-> xss 
-[1] 156.302 
-</code> 
- 
  
 ====== E.g. 1 ====== ====== E.g. 1 ======
r/oneway_anova.txt · Last modified: 2022/04/28 10:26 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki