Welch’s one-way ANOVA with planned contrasts and Holm correction
infection
statistics
ANOVA
Compares multiple cell types or treatment conditions across one or more viral/experimental conditions. Uses Welch’s ANOVA (robust to unequal variances) on log₁₀-transformed data, with planned pairwise contrasts against a reference group and Holm multiple-testing correction.
When to use this template: You have measurements (e.g., viral titres, protein levels) across several cell types or treatment groups, and you need to test whether a reference group differs from the others, accounting for potential heteroscedasticity.
## ── USER CONFIGURATION ──────────────────────────────────────────────────────## CONDITION_FILES: Named character vector of CSV files to load.# Names become the "condition" label in all outputs.# Each CSV must be wide-format: one column per cell type / sample group,# with replicate runs stored as "CellType.1", "CellType.2" … suffix columns.# (This is the format produced by many plate-reader and CQ1 exports.)#CONDITION_FILES <-c("Condition_A"="data/Condition_A.csv","Condition_B"="data/Condition_B.csv","Condition_C"="data/Condition_C.csv")# FOCAL_CONDITION: Which condition to run the planned-contrast analysis on.# Must match one of the names() of CONDITION_FILES exactly.FOCAL_CONDITION <-"Condition_A"# REFERENCE_GROUP: The cell type / sample group used as the reference in# planned comparisons (i.e., all other groups are tested against this one).REFERENCE_GROUP <-"CellType_A"# LOG_TRANSFORM: Apply log10 before analysis? Almost always TRUE for viral# titres and NGS read-count data.LOG_TRANSFORM <-TRUE# ALPHA: Significance threshold for all tests.ALPHA <-0.05## ────────────────────────────────────────────────────────────────────────────
---title: "03 · Multi-Condition ANOVA"subtitle: "Welch's one-way ANOVA with planned contrasts and Holm correction"description: | Compares multiple cell types or treatment conditions across one or more viral/experimental conditions. Uses Welch's ANOVA (robust to unequal variances) on log₁₀-transformed data, with planned pairwise contrasts against a reference group and Holm multiple-testing correction.categories: [infection, statistics, ANOVA]---## Overview| Item | Details ||------|---------|| **Input** | Wide-format CSV per condition (columns = cell types, rows = replicates) || **Key packages** | `tidyverse`, `car`, `broom` || **Statistics** | Shapiro-Wilk, Bartlett, Levene, Welch one-way ANOVA, Welch t-tests || **Correction** | Holm (FWER) || **Output** | Diagnostic table · ANOVA result · Contrast table with fold-changes || **Download** | [template.Rmd](template.Rmd) |::: {.callout-tip}**When to use this template:** You have measurements (e.g., viral titres, protein levels)across several cell types or treatment groups, and you need to test whether a referencegroup differs from the others, accounting for potential heteroscedasticity.:::[Back to Gallery](../../index.html){.btn .btn-outline-secondary}[Open Template File](template.Rmd){.btn .btn-primary}```{r child="template.Rmd"}```