qDunnett {PMCMRplus} | R Documentation |
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)
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[X ≤q x] otherwise, P[X > x]. |
Dunnett's distribution is a special case of the multivariate t distribution.
Let the total sample size be N = n_0 + ∑_i^m n_i, with m the number of treatment groups, than the quantile T_{m v ρ α} is calculated with v = N - k degree of freedom and the correlation ρ
ρ_{ij} = √{\frac{n_i n_j} {≤ft(n_i + n_0\right) ≤ft(n_j+ n_0\right)}} ~~ (i \ne j).
The functions determines m via the length of the input
vector n
.
Quantiles and p-values are computed with the functions of the package mvtnorm.
pDunnett
gives the distribution function and
qDunnett
gives its inverse, the quantile function.
The results are seed depending.
## 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)