Description Usage Arguments Details Value References See Also Examples
View source: R/power13_13_13.R
Computes the power of the 1/3-1/3-1/3 procedure, that is, the power to detect the overall A effect, the simple A effect, or the simple AB effect.
1 2 3 4 5 | power13_13_13(n, hrA, hrB, hrAB, avgprob, probA_C, probAB_C, crit13, dig,
cormat12 = matrix(c(1, sqrt(0.5), sqrt(0.5), 1), byrow = T, nrow = 2),
cormat23 = matrix(c(1, 0.5, 0.5, 1), byrow = T, nrow = 2),
cormat123 = matrix(c(1, sqrt(0.5), sqrt(0.5), sqrt(0.5), 1, 0.5,
sqrt(0.5), 0.5, 1), byrow = T, nrow = 3), niter = 5, abseps = 0.001)
|
n |
total subjects with n/4 subjects in each of the C, A, B, and AB groups |
hrA |
group A to group C hazard ratio; |
hrB |
group B to group C hazard ratio; |
hrAB |
group AB to group C hazard ratio; |
avgprob |
event probability averaged across the C, A, B, and AB groups |
probA_C |
event probability averaged across the A and C groups |
probAB_C |
event probability averaged across the AB and C groups |
crit13 |
rejection critical value for the overall A, simple A, and simple AB logrank statistics |
dig |
number of decimal places to |
cormat12 |
asymptotic correlation matrix for the overall A and simple A, respectively, simple AB logrank statistics |
cormat23 |
asymptotic correlation matrix for the simple A and simple AB logrank statistics |
cormat123 |
asymptotic correlation matrix for the overall A, simple A, and simple AB logrank statistics |
niter |
number of times we call |
abseps |
|
For a 2-by-2 factorial design, this function computes
the probability that either the overall A
or the simple A or the simple AB logrank statistics
reject their null hypotheses at the
crit13
critical value. As described in Leifer, Troendle, et al. (2019),
the crit13
= -2.32 critical value
corresponds to controlling the famiywise error of the 1/3-1/3-1/3 procedure at the
two-sided 0.05 significance level.
The critical value -2.32 may be computed using the crit2x2
function.
The pmvnorm
function
from the mvtnorm
package is used to calculate
the powers for rejecting the pairwise and three-way intersections of
Since these powers involve bivariate, respectively, trivariate,
normal integration over an unbounded region in R^2, respectively, R^3, pmvnorm
uses a random seed for these computations. To smooth out the
randomness, pmvnorm
is called niter
times and
the average value over the niter
calls is taken to be those powers.
poweroverA |
power to detect the overall A effect |
powerA |
power to detect the simple A effect |
powerAB |
power to detect the simple AB effect |
power13.13.13 |
power to detect the overall A, simple A, or simple AB effects, i.e., power of the 1/3-1/3-1/3 procedure |
Leifer, E.S., Troendle, J.F., Kolecki, A., Follmann, D. Joint testing of overall and simple effect for the two-by-two factorial design. (2019). Submitted.
Slud, E.V. Analysis of factorial survival experiments. Biometrics. 1994; 50: 25-38.
crit2x2
, lgrkPower
, strLgrkPower
, pmvnorm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Corresponds to scenario 5 in Table 2 from Leifer, Troendle, et al. (2019).
rateC <- 0.0445
hrA <- 0.80
hrB <- 0.80
hrAB <- 0.72
mincens <- 4.0
maxcens <- 8.4
evtprob <- eventProb(rateC, hrA, hrB, hrAB, mincens, maxcens)
avgprob <- evtprob$avgprob
probAB_C <- evtprob$probAB_C
probA_C <- evtprob$probA_C
dig <- 2
alpha <- 0.05
corAa <- 1/sqrt(2)
corAab <- 1/sqrt(2)
coraab <- 1/2
crit13 <- crit2x2(corAa, corAab, coraab, dig, alpha)$crit13
n <- 4600
power13_13_13(n, hrA, hrB, hrAB, avgprob, probA_C, probAB_C,
crit13, dig, cormat12 = matrix(c(1, sqrt(0.5), sqrt(0.5), 1), byrow = TRUE,
nrow = 2), cormat23 = matrix(c(1, 0.5, 0.5, 1), byrow = TRUE, nrow = 2),
cormat123 = matrix(c(1, sqrt(0.5), sqrt(0.5), sqrt(0.5), 1, 0.5,
sqrt(0.5), 0.5, 1), byrow=TRUE, nrow = 3), niter = 1, abseps = 1e-03)
# $poweroverA
# [1] 0.5861992
# $powerA
# [1] 0.5817954
# $powerAB
# [1] 0.9071236
# $power13.13.13
# [1] 0.9302078
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.