power.williams.test {PMCMRplus} | R Documentation |
Compute the power of a Williams' test, or determine parameters to obtain a target power.
power.williams.test(n = NULL, k, delta, sd = 1, power = NULL, ...)
n |
number of observations (per group). |
k |
number of treatment groups. |
delta |
clinically meaningful minimal difference (between a treatment group and control). |
sd |
common standard deviation. |
power |
power of test (1 minus Type II error probability). |
... |
further arguments, currently ignored. |
Exactly one of the parameters n
or power
must be passed as NULL
, and that
parameter is determined from the others.
The function has implemented the following Eq. in order to estimate power (Chow et al. 2008):
1 - beta = 1 - Phi( TKalpha - [|Delta| / sigma * sqrt(2/n)])
with |Delta| the clinically meaningful minimal difference, TKalpha the critical Williams' t-statistic for alpha = 0.05, v = ∞ degree of freedom and Phi the probability function of the standard normal function.
The required sample size (balanced design) is estimated numerically
(see optimise
). The optimal sample size
is searched within the interval of
3 <= n <= 120 in order to minimise
the squared difference between nominal power and estimated power.
Object of class ‘power.htest
’, a list of the arguments
(including the
computed one) augmented with method and note elements.
The current function calculates power for sig.level = 0.05
significance level (Type I error probability) only (one-sided test).
Chow, S.-C., Shao, J., Wan, H., 2008, Sample Size Calculations in Clinical Research, 2nd ed, Chapman & Hall/CRC: Boca Raton, FL.
## Chow et al. 2008, p. 288 depicts 53 (rounded), ## better use ceiling for rounding power.williams.test(power = 0.8, k = 3, delta = 11, sd = 22) power.williams.test(n = 54, k = 3, delta = 11, sd = 22) ## PASS manual example: ## up-rounded n values are: ## 116, 52, 29, 14, 8 and 5 ## according to PASS manual, p. 595-5 D <- c(10, 15, 20, 30, 40, 50) y <- sapply(D, function(delta) { power.williams.test(power = 0.9, k = 4, delta = delta, sd = 25)$n }) ceiling(y) ## Not run: ## compare with power.t.test ## and bonferroni correction power.t.test(power = 0.9, delta = 50, sd = 25, sig.level = 0.05 / 4, alternative = "one.sided") ## End(Not run)