Three-way ANOVA + Tukey letters
MinutePlot® and R on the same data. MinutePlot version 1.0.0; R 4.5.2.
Dataset
- npk (N × P × K) — Yield of peas in a 2×2×2 factorial on 6 blocks (R: datasets::npk); all three factors used.
- Data format for MinutePlot: npk_threeway_minuteplot.csv — arranged exactly as the app’s data template for this test expects (paste it into the app).
- Data format for R: npk_r.csv — the long-format file the R script reads (keep it in the script’s folder).
- R built-in: the script loads npk with data().
Setup
In MinutePlot:
- Workbench → Three-way ANOVA → paste npk_threeway_minuteplot.csv (K as the super-header, P blocks under each K, three replicates, N down the rows).
- 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 runnpk_threeway.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:
- Three-way ANOVA of yield by N, P and K (each 0/1) with all interactions, n = 3 per cell, α = 0.05.
- Interactions: every two-way term and the three-way term are tested and listed; the pairwise comparisons and letters are on the 8 cell means (the highest-order grouping MinutePlot reports), Tukey HSD.
- Blocks are omitted to match MinutePlot’s fully crossed design; this entry is a software comparison, not a recommended analysis of npk.
Side-by-side results
ANOVA summary (main effects and interactions)
MinutePlot®
| Term | df | F | p |
|---|---|---|---|
| N | 1, 16 | 6.1608 | 0.0245 |
| P | 1, 16 | 0.2735 | 0.6082 |
| K | 1, 16 | 3.0986 | 0.0975 |
| N × P | 1, 16 | 0.6927 | 0.4175 |
| N × K | 1, 16 | 1.0785 | 0.3145 |
| P × K | 1, 16 | 0.0157 | 0.9019 |
| N × P × K | 1, 16 | 1.2043 | 0.2887 |
R
| Term | df | F | p |
|---|---|---|---|
| N | 1, 16 | 6.1608 | 0.0245 |
| P | 1, 16 | 0.2735 | 0.6082 |
| K | 1, 16 | 3.0986 | 0.0975 |
| N × P | 1, 16 | 0.6927 | 0.4175 |
| N × K | 1, 16 | 1.0785 | 0.3145 |
| P × K | 1, 16 | 0.0157 | 0.9019 |
| N × P × K | 1, 16 | 1.2043 | 0.2887 |
R values: verified in R 4.5.2 (see the verdict).
Cell means with significance letters
MinutePlot®
| N | P | K | Mean | Letters |
|---|---|---|---|---|
| N0 | P1 | K1 | 50.500 | a |
| N0 | P1 | K0 | 54.333 | a |
| N0 | P0 | K1 | 52.000 | a |
| N0 | P0 | K0 | 51.433 | a |
| N1 | P1 | K1 | 54.367 | a |
| N1 | P1 | K0 | 57.933 | a |
| N1 | P0 | K1 | 54.667 | a |
| N1 | P0 | K0 | 63.767 | a |
R
| N | P | K | Mean | Letters |
|---|---|---|---|---|
| N0 | P1 | K1 | 50.500 | a |
| N0 | P1 | K0 | 54.333 | a |
| N0 | P0 | K1 | 52.000 | a |
| N0 | P0 | K0 | 51.433 | a |
| N1 | P1 | K1 | 54.367 | a |
| N1 | P1 | K0 | 57.933 | a |
| N1 | P0 | K1 | 54.667 | a |
| N1 | P0 | K0 | 63.767 | a |
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
npk_threeway.R — each script loads its data, prints its versions and the R-side tables shown above, in page order; no plotting.