Two-way ANOVA + Tukey letters — with interaction (ToothGrowth)
MinutePlot® and R on the same data. MinutePlot version 1.0.0; R 4.5.2.
Dataset
- ToothGrowth — Odontoblast length in 60 guinea pigs by supplement (orange juice, ascorbic acid) and dose (0.5, 1.0, 2.0 mg/day), 10 per cell (R: datasets::ToothGrowth; Crampton 1947).
- Data format for MinutePlot: toothgrowth_minuteplot.csv — arranged exactly as the app’s data template for this test expects (paste it into the app).
- Data format for R: toothgrowth_r.csv — the long-format file the R script reads (keep it in the script’s folder).
- R built-in: the script loads ToothGrowth with data().
Setup
In MinutePlot:
- Workbench → Two-way ANOVA → paste toothgrowth_minuteplot.csv (supp down the rows, dose 0.5 / 1.0 / 2.0 as column blocks, ten replicates per cell).
- Post-hoc test: Tukey HSD (the default) · significance level α = 0.05 (the default) → Confirm and Analyze.
- Read the ANOVA table and the cell means with letters from the results; the page compares the all-cells letter set.
In R:
- Install once:
install.packages(c("emmeans", "multcomp", "multcompView")); then runtoothgrowth_twoway.Rtop to bottom (source it, or paste it into the console) with the R data file in the same folder. - R 4.5.2 and the package versions in the page header; each script prints the versions it runs under.
The analysis:
- Two-way ANOVA of len by supp (2 levels) and dose (3 levels, as a factor) with interaction, n = 10 per cell, α = 0.05.
- Pairwise comparisons of the 6 cell means: Tukey HSD; compact letters from the significant pairs -- this dataset has a significant interaction and several letter groups.
Side-by-side results
ANOVA summary
MinutePlot®
| Term | df | F | p |
|---|---|---|---|
| supp | 1, 54 | 15.5720 | 0.0002 |
| dose | 2, 54 | 92.0000 | < 0.0001 |
| supp × dose | 2, 54 | 4.1070 | 0.0219 |
R
| Term | df | F | p |
|---|---|---|---|
| supp | 1, 54 | 15.5720 | 0.0002 |
| dose | 2, 54 | 92.0000 | < 0.0001 |
| supp × dose | 2, 54 | 4.1070 | 0.0219 |
R values: verified in R 4.5.2 (see the verdict).
Cell means with significance letters
MinutePlot®
| supp | dose | Mean | Letters |
|---|---|---|---|
| VC | 0.5 | 7.980 | c |
| VC | 1.0 | 16.770 | b |
| VC | 2.0 | 26.140 | a |
| OJ | 0.5 | 13.230 | b |
| OJ | 1.0 | 22.700 | a |
| OJ | 2.0 | 26.060 | a |
R
| supp | dose | Mean | Letters |
|---|---|---|---|
| VC | 0.5 | 7.980 | a |
| VC | 1.0 | 16.770 | b |
| VC | 2.0 | 26.140 | c |
| OJ | 0.5 | 13.230 | b |
| OJ | 1.0 | 22.700 | c |
| OJ | 2.0 | 26.060 | c |
R values: verified in R 4.5.2 (see the verdict).
In the app each cell carries a compound label such as Aa (Aa1 with three factors): uppercase compares the first factor within each level of the second, lowercase the reverse (the digit the third factor). The plain letters shown here are MinutePlot’s single letter set over all cells, the direct counterpart of R’s cld(). MinutePlot assigns “a” to the highest mean, R to the lowest — a display convention, not a discrepancy; the grouping (which cells share a letter) is what is compared.
Verdict
R script
toothgrowth_twoway.R — each script loads its data, prints its versions and the R-side tables shown above, in page order; no plotting.