Changes between Version 4 and Version 5 of SOPs/anova
- Timestamp:
- 05/24/13 14:24:35 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SOPs/anova
v4 v5 5 5 See the [http://www.graphpad.com/support/faqid/1745/ Prism help page] for some general considerations. 6 6 7 ==== Reading in Data ====7 ==== Reading in data ==== 8 8 9 9 … … 28 28 }}} 29 29 30 ==== Creating an ANOVA Table ====30 ==== Creating an ANOVA table ==== 31 31 * Use the command //anova// or //aov// with summary. The first argument is the dependent variable, followed by ~, and then by independent variable(s). 32 32 * So if we want to set up a model where weight is a function of the group (e.g., the weight potentially depends on the group) … … 40 40 }}} 41 41 42 == Post- Test: Comparing All Pairs of Means ==42 == Post-test: Comparing all pairs of means == 43 43 44 44 ==== Tukey ==== … … 67 67 Two-way ANOVA should be used for experiments where two different factors are being studied (such as comparing different treatments of different genotypes of mice). 68 68 69 ==== Reading in Data====69 ==== Reading in data, plotting, and summarizing ==== 70 70 71 71 … … 80 80 # ... 81 81 strains = read.delim("brain_weights.txt",header=TRUE) 82 83 # Plot the data by group 84 boxplot(weight ~ paste(genotype, treatment), data=strains) 85 stripchart(weight ~ paste(genotype, treatment), data=strains, vert=T, method="jitter", jitter = 0.4, pch=19, cex=2, add=T) 86 87 # Summarize the data by group 88 tapply(strains$weight, paste(strains$genotype, strains$treatment), mean) 82 89 }}} 83 90 … … 98 105 Note that the p-value for each factor depends on the order of the factors in the above formulas. 99 106 100 == Post- Test: Comparing All Pairs of Means ==107 == Post-test: Comparing all pairs of means == 101 108 102 109 As before, with 1-way ANOVA,