Always returns Welch t (unequal variance, canonical), Student t
(equal variance), and Mann-Whitney U (rank-based). The Welch
p-value is the canonical answer; the others are the sensitivity
range.
Usage
mrm_two_treatment_test(a, b, alpha = 0.05)
Arguments
- a, b
Outcome vectors under treatments A and B.
- alpha
CI level (default 0.05).
Value
Named list with estimate, se, t_statistic, df,
p_welch, p_student, p_mannwhitney, ci_lower, ci_upper,
n_a, n_b, interpretation.
Examples
set.seed(2026)
a <- rnorm(40, mean = 5, sd = 1.2)
b <- rnorm(40, mean = 5.5, sd = 1.5)
res <- mrm_two_treatment_test(a, b)
res$estimate # mean(a) - mean(b)
#> [1] -0.355382
res$p_welch # canonical p-value
#> [1] 0.2184419
res$p_mannwhitney # rank-based sensitivity check
#> [1] 0.3500881