Dunnett function

Dunnett Distribution

Dunnett Distribution

Distribution function and quantile function for the distribution of Dunnett's many-to-one comparisons test.

qDunnett(p, n0, n) pDunnett(q, n0, n, lower.tail = TRUE)

Arguments

  • p: vector of probabilities.
  • n0: sample size for control group.
  • n: vector of sample sizes for treatment groups.
  • q: vector of quantiles.
  • lower.tail: logical; if TRUE (default), probabilities are P[Xx]P[X \leq x] otherwise, P[X>x]P[X > x].

Returns

pDunnett gives the distribution function and qDunnett gives its inverse, the quantile function.

Details

Dunnett's distribution is a special case of the multivariate t distribution.

Let the total sample size be N=n0+imniN = n_0 + \sum_i^m n_i, with mm the number of treatment groups, than the quantile TmvραT_{m v \rho \alpha}

is calculated with v=Nkv = N - k degree of freedom and the correlation ρ\rho

ρij=ninj(ni+n0)(nj+n0)  (ij). \rho_{ij} = \sqrt{\frac{n_i n_j}{\left(n_i + n_0\right) \left(n_j+ n_0\right)}} ~~(i \ne j).

The functions determines mm via the length of the input vector n.

Quantiles and p-values are computed with the functions of the package mvtnorm .

Note

The results are seed depending.

Examples

## Table gives 2.34 for df = 6, m = 2, one-sided set.seed(112) qval <- qDunnett(p = 0.05, n0 = 3, n = rep(3,2)) round(qval, 2) set.seed(112) pDunnett(qval, n0=3, n = rep(3,2), lower.tail = FALSE) ## Table gives 2.65 for df = 20, m = 4, two-sided set.seed(112) qval <- qDunnett(p = 0.05/2, n0 = 5, n = rep(5,4)) round(qval, 2) set.seed(112) 2 * pDunnett(qval, n0= 5, n = rep(5,4), lower.tail= FALSE)

See Also

qmvt pmvt dunnettTest

  • Maintainer: Thorsten Pohlert
  • License: GPL (>= 3)
  • Last published: 2024-09-08

Useful links