Skip to content
Prev 175354 / 398506 Next

re form data for aov()?

As a followup, I show below what I get if I "break out" the variables by
making a new data frame with new (boolean) columns that indicate the
treatment.  (The experiment was germ count on hands, after cleansing with 4
different methods.)

What I'm hoping is to find a way to do this in a less "hard-wired" way (i.e.
in which I do not have to change my code for every application, explicitly
naming the factors).
Analysis of Variance Table

Response: Bacterial.Counts
                   Df Sum Sq Mean Sq F value    Pr(>F)    
Alcohol.Spray       1  27473   27473 19.4822 0.0001374 ***
Antibacterial.Soap  1   1925    1925  1.3653 0.2524658    
Soap                1    484     484  0.3432 0.5626651    
Residuals          28  39484    1410                      
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1