Skip to contents

Each treatment mean is compared with the control by t_i = (ybar_i - ybar_0) / sqrt(MSE (1/n_i + 1/n_0)) on the pooled within-group mean square with N - k - 1 degrees of freedom; jointly the t_i are multivariate t with correlations lambda_i lambda_j, lambda_i = sqrt(n_i / (n_i + n_0)) (Dunnett 1955). The two-sided adjusted p-value is 1 - P(max_j |T_j| <= |t_i|), computed by quadrature of Dunnett's double integral: multcomp's glht(..., mcp(g = "Dunnett")).

Usage

morie_dunnett_test(control, ...)

Arguments

control

Numeric control observations.

...

Numeric vectors, one per treatment group.

Value

Named list: comparisons (data frame of group, diff, se, t, p_adj), mse, df, n_control.

References

Dunnett, C. W. (1955). JASA 50, 1096-1121. Hothorn, T., Bretz, F. & Westfall, P. (2008). Biometrical Journal 50, 346-363.

Examples

morie_dunnett_test(c(5.1, 4.8, 5.5, 5), c(5.9, 6.1, 5.7, 6.3), c(5.2, 5.4, 4.9, 5.6))$comparisons
#>   group  diff       se        t       p_adj
#> 1     1 0.900 0.201039 4.476744 0.002852181
#> 2     2 0.175 0.201039 0.870478 0.607090072