Continuous Outcome — Distribution Diagnostics & Hypothesis Testing
Table of Contents
Open-source skill.
Scope Boundary
Use this skill when:
- The outcome is a single continuous variable and the first need is a transparent baseline comparison across groups.
- A primary t-test / ANOVA-style analysis is appropriate before regression or nonlinear exploratory work.
Do not use this skill when:
- The design is repeated / paired, multivariate, or time-indexed.
- The outcome is binary, count, survival, ordinal, or SEM-based rather than continuous.
Workflow
Read each step file in workflow/ before executing that step.
| Step |
Responsibility |
Executor |
Document |
Input |
Output |
| Collect |
Collect Inputs |
Main Agent |
workflow/step01-collect-inputs.md |
User input |
Structured input summary |
| Diagnose |
Check Distribution |
Main Agent |
workflow/step02-check-distribution.md |
Prior step output |
PART 1 code block |
| Test |
Run Primary Test |
Main Agent |
workflow/step03-run-primary-test.md |
Prior step output |
PART 2-3 code blocks |
Decision Tree
1. CHECK DISTRIBUTION
├── Normal (Shapiro-Wilk p ≥ .05, |skewness| < 1) → parametric primary
└── Non-normal → nonparametric primary + recommend QR/trees
2. GROUP COMPARISON
├── 2 groups → Welch's t + Cohen's d + Mann-Whitney U
└── 3+ groups → ANOVA + η² + Tukey HSD + Kruskal-Wallis
Required Inputs
| Role |
What to collect |
| Outcome (Y) |
Variable name, units, what it measures |
| Group variable |
What defines groups, how many levels |
| Predictors |
For recommendation block (not executed) |
| Covariates |
For recommendation block (not executed) |
Code Structure
PART 0: Setup & Data Loading
PART 1: Distribution Diagnostics → plot_01_distribution.png
PART 2: Primary Hypothesis Test → plot_02_boxplot_[var].png
PART 3: Recommendation Block → text listing additional analyses available
Reporting Standards
- p-values: "< .001" not "0.000"; exact to 3 decimals otherwise
- Effect sizes: Cohen's d (t-test), η² (ANOVA) — always alongside p
- 95% CIs: always for mean differences
- Degrees of freedom: always with t and F statistics
- Sample size: final analytic N
- Decimal places: 2 for M/SD, 3 for p and effect sizes
- Non-significance: "not statistically significant at α = .05" — never "no effect"
- Normality check: Shapiro–Wilk W, p on residuals (not Y directly) for t-test and ANOVA; also report skewness and kurtosis. With large samples (N > 200), Shapiro–Wilk is over-sensitive — trivial deviations from normality reach significance. When N > 200, rely primarily on visual inspection (Q–Q plot) and skewness/kurtosis magnitudes; treat Shapiro–Wilk p as a supporting diagnostic, not a gatekeeper.
- Variance homogeneity: Levene's test (F, p) before choosing Student's t vs Welch's t or pooled ANOVA vs Welch ANOVA. Default to Welch's t (robust to unequal variances) unless Levene p ≥ .05 and sample sizes are balanced.
Hypothesis Tests
| Scenario |
Normal (equal var) |
Normal (unequal var) |
Non-Normal |
| 2 independent groups |
Student's t + Tukey HSD (optional) |
Welch's t (default) |
Mann-Whitney U |
| 3+ independent groups |
ANOVA + Tukey HSD |
Welch ANOVA + Games-Howell post-hoc |
Kruskal-Wallis + Dunn's |
When Levene's test indicates heterogeneous variances across 3+ groups, use Welch ANOVA for the omnibus test and Games-Howell for pairwise comparisons — Tukey HSD assumes equal variances and inflates Type I error when variances differ. Report which post-hoc was used and why.
Paired/repeated designs → vera-data-repeated-reviewing.
Example Dataset
R built-in mtcars: outcome = mpg, 2-group = am, 3+ group = cyl.
Python: sm.datasets.get_rdataset("mtcars").data (with offline fallback to bundled examples/mtcars.csv).
Method Status
| Status |
Methods |
| Implemented in this skill |
Residual normality diagnostics, Levene-informed Welch / ANOVA branching, post-hoc tests, and nonparametric confirmation |
Implemented downstream in vera-data-continuous-generating |
Extended group comparisons, OLS, quantile regression, subgroup analysis, and exploratory tree-based models |
| Out of scope in this open-source baseline |
Repeated-measures, mixed-effects, and any continuous-outcome workflow that depends on a different data structure |
Minimal Smoke Test
- Smoke-test prompt: "Run
vera-data-continuous-reviewing on mtcars, using mpg as the outcome and am as the primary grouping variable. Produce the standard baseline artifacts."
Cross-Skill Interface
Output:
├── code_r → .R script
├── code_python → .py script
├── figures/ → 2 PNGs (distribution + boxplot)
└── recommendations → text block (additional analyses available)
Next step: Invoke vera-data-continuous-generating from this skillset to run the full pipeline (additional tests, subgroup analysis, modeling, manuscript generation). See ../../CROSS-SKILL-INTERFACE.md for the shared handoff contract.
1---2name: vera-data-continuous-reviewing3description: Runs distribution diagnostics and primary hypothesis tests for continuous outcome variables. Produces Shapiro-Wilk normality check, skewness, kurtosis, Q-Q plot, and one fully interpreted group comparison (Welch's t for 2 groups or ANOVA with Tukey HSD for 3+ groups) with effect sizes and nonparametric confirmation. Ends with a recommendation block listing Outputs .R and .py scripts with 2 publication-quality plots. Triggered when user has a continuous/numeric outcome and says "analyze continuous outcome," "my DV is numeric," "compare group means," or names a continuous variable like weight, score, income, time, cost, mpg, blood pressure. Does not handle binary, count, survival, ordinal, repeated measures, or SEM outcomes.4---56# Continuous Outcome — Distribution Diagnostics & Hypothesis Testing78## Table of Contents910- [Scope Boundary](#scope-boundary)11- [Workflow](#workflow)12- [Decision Tree](#decision-tree)13- [Required Inputs](#required-inputs)14- [Code Structure](#code-structure)15- [Reporting Standards](#reporting-standards)16- [Hypothesis Tests](#hypothesis-tests)17- [Example Dataset](#example-dataset)18- [Method Status](#method-status)19- [Minimal Smoke Test](#minimal-smoke-test)20- [Cross-Skill Interface](#cross-skill-interface)212223Open-source skill.2425## Scope Boundary2627Use this skill when:28- The outcome is a single continuous variable and the first need is a transparent baseline comparison across groups.29- A primary t-test / ANOVA-style analysis is appropriate before regression or nonlinear exploratory work.3031Do not use this skill when:32- The design is repeated / paired, multivariate, or time-indexed.33- The outcome is binary, count, survival, ordinal, or SEM-based rather than continuous.3435## Workflow3637Read each step file in `workflow/` before executing that step.3839| Step | Responsibility | Executor | Document | Input | Output |40|---|---|---|---|---|---|41| Collect | Collect Inputs | Main Agent | `workflow/step01-collect-inputs.md` | User input | Structured input summary |42| Diagnose | Check Distribution | Main Agent | `workflow/step02-check-distribution.md` | Prior step output | PART 1 code block |43| Test | Run Primary Test | Main Agent | `workflow/step03-run-primary-test.md` | Prior step output | PART 2-3 code blocks |4445## Decision Tree4647```481. CHECK DISTRIBUTION49 ├── Normal (Shapiro-Wilk p ≥ .05, |skewness| < 1) → parametric primary50 └── Non-normal → nonparametric primary + recommend QR/trees51522. GROUP COMPARISON53 ├── 2 groups → Welch's t + Cohen's d + Mann-Whitney U54 └── 3+ groups → ANOVA + η² + Tukey HSD + Kruskal-Wallis55```5657## Required Inputs5859| Role | What to collect |60|---|---|61| **Outcome (Y)** | Variable name, units, what it measures |62| **Group variable** | What defines groups, how many levels |63| **Predictors** | For recommendation block (not executed) |64| **Covariates** | For recommendation block (not executed) |6566## Code Structure6768```69PART 0: Setup & Data Loading70PART 1: Distribution Diagnostics → plot_01_distribution.png71PART 2: Primary Hypothesis Test → plot_02_boxplot_[var].png72PART 3: Recommendation Block → text listing additional analyses available73```7475## Reporting Standards76771. p-values: "< .001" not "0.000"; exact to 3 decimals otherwise782. Effect sizes: Cohen's d (t-test), η² (ANOVA) — always alongside p793. 95% CIs: always for mean differences804. Degrees of freedom: always with t and F statistics815. Sample size: final analytic N826. Decimal places: 2 for M/SD, 3 for p and effect sizes837. Non-significance: "not statistically significant at α = .05" — never "no effect"848. Normality check: Shapiro–Wilk W, p on **residuals** (not Y directly) for t-test and ANOVA; also report skewness and kurtosis. With large samples (N > 200), Shapiro–Wilk is over-sensitive — trivial deviations from normality reach significance. When N > 200, rely primarily on visual inspection (Q–Q plot) and skewness/kurtosis magnitudes; treat Shapiro–Wilk p as a supporting diagnostic, not a gatekeeper.859. Variance homogeneity: **Levene's test** (F, p) before choosing Student's t vs Welch's t or pooled ANOVA vs Welch ANOVA. Default to Welch's t (robust to unequal variances) unless Levene p ≥ .05 and sample sizes are balanced.8687## Hypothesis Tests8889| Scenario | Normal (equal var) | Normal (unequal var) | Non-Normal |90|---|---|---|---|91| 2 independent groups | Student's t + Tukey HSD (optional) | Welch's t (default) | Mann-Whitney U |92| 3+ independent groups | ANOVA + Tukey HSD | **Welch ANOVA + Games-Howell** post-hoc | Kruskal-Wallis + Dunn's |9394When Levene's test indicates heterogeneous variances across 3+ groups, use Welch ANOVA for the omnibus test and **Games-Howell** for pairwise comparisons — Tukey HSD assumes equal variances and inflates Type I error when variances differ. Report which post-hoc was used and why.9596Paired/repeated designs → `vera-data-repeated-reviewing`.9798## Example Dataset99100R built-in `mtcars`: outcome = mpg, 2-group = am, 3+ group = cyl.101Python: `sm.datasets.get_rdataset("mtcars").data` (with offline fallback to bundled `examples/mtcars.csv`).102103## Method Status104105| Status | Methods |106|---|---|107| Implemented in this skill | Residual normality diagnostics, Levene-informed Welch / ANOVA branching, post-hoc tests, and nonparametric confirmation |108| Implemented downstream in `vera-data-continuous-generating` | Extended group comparisons, OLS, quantile regression, subgroup analysis, and exploratory tree-based models |109| Out of scope in this open-source baseline | Repeated-measures, mixed-effects, and any continuous-outcome workflow that depends on a different data structure |110111## Minimal Smoke Test112113- Smoke-test prompt: "Run `vera-data-continuous-reviewing` on `mtcars`, using `mpg` as the outcome and `am` as the primary grouping variable. Produce the standard baseline artifacts."114115## Cross-Skill Interface116117```118Output:119├── code_r → .R script120├── code_python → .py script121├── figures/ → 2 PNGs (distribution + boxplot)122└── recommendations → text block (additional analyses available)123```124125Next step: Invoke `vera-data-continuous-generating` from this skillset to run the full pipeline (additional tests, subgroup analysis, modeling, manuscript generation). See `../../CROSS-SKILL-INTERFACE.md` for the shared handoff contract.