[R] Two Way ANOVA

David Mackovjak bejitto101 at yahoo.com
Wed Mar 19 23:02:12 CET 2008


First time using, the mailing list and I'm somewhat new to R, so excuse me if I do anything wrong.

I was wondering how I would set up a two way ANOVA for the following data:


      
      Nitrogen
  (0)
       
      Nitrogen
  (20)
       
       
         
       
      (cell
  means)
       
      (cell
  means)
      [Sulfur means]
        Sulfur (0)
      4.48
       
      5.76
       
       
         
      4.52
      (4.54)
      5.64
      (5.73)
      [5.14]
         
      4.63
       
      5.78
       
       
         
       
       
       
       
       
        Sulfur (3)
      4.70
       
      7.01
       
       
         
      4.65
      (4.64)
      7.11
      (7.05)
      [5.84]
         
      4.57
       
      7.02
       
       
         
       
       
       
       
       
        Sulfur (6)
      5.21
       
      5.88
       
       
         
      5.23
      (5.27)
      5.82
      (5.81)
      [5.54]
         
      5.38
       
      5.73
       
       
         
       
       
       
       
       
        Sulfur (9)
      5.88
       
      6.26
       
       
         
      5.98
      (5.81)
      6.26
      (6.30)
      [6.11]
         
      5.91
       
      6.37
       
       
         
       
       
       
       
       
        [Nitrogen means]
      [5.10]
       
      [6.22]
       
      
 
   Source ofVariation                   SSSulfur                                      3.15
Nitrogen                                  7.59
Sulfur x Nitrogen                     3.84
Error                                       0.08Total                                     14.66                                                                    

>From googling I know I want to get it to the form:

> fit <- aov(y ~ A*B, data=mydataframe)

But what would I set for A, B and y?




      ____________________________________________________________________________________
Looking for last minute shopping deals?



More information about the R-help mailing list