Description Usage Arguments Details Value References See Also Examples
Computes the power of the 1/2-1/2 procedure, that is, the power to detect the simple A effect or the simple AB effect.
1 2 | power12_12(n, hrA, hrAB, probA_C, probAB_C, crit12, cormat = matrix(c(1,
0.5, 0.5, 1), byrow = TRUE, nrow = 2), 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; |
hrAB |
group AB to group C hazard ratio; |
probA_C |
event probability averaged across the A and C groups |
probAB_C |
event probability averaged across the AB and C groups |
crit12 |
logrank statistic critical value for both the simple A and simple AB effects |
cormat |
asymptotic correlation matrix for the 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 simple A or the simple AB logrank statistics
reject their null hypotheses using a crit12
critical value.
When the two-sided familywise type I error is 0.05, we may use
crit2x2
to compute crit12
= -2.22 which corresponds
to a 0.0264 two-sided significance level. This is described in
Leifer, Troendle, et al. (2019).
The pmvnorm
function
from the mvtnorm
package is used to calculate
the power that both (intersection) the simple A and simple B effects are detected.
pmvnorm
uses a random seed in its algorithm.
To smooth out the randomness, pmvnorm
is called
niter
times and the average value over the niter
calls is taken to be that power.
poweroverA |
power to detect the overall A effect |
powerA |
power to detect the simple A effect |
powerAB |
power to detect the simple AB effect |
power12.12 |
power to detect the simple A or simple AB effects, i.e., power of the 1/2-1/2 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.
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 | # Corresponds to scenario 5 in Table 2 from Leifer, Troendle, et al. (2019).
rateC <- 0.0445 # one-year C group event rate
hrA <- 0.80
hrB <- 0.80
hrAB <- 0.72
mincens <- 4.0
maxcens <- 8.4
evtprob <- eventProb(rateC, hrA, hrB, hrAB, mincens, maxcens)
probA_C <- evtprob$probA_C
probAB_C <- evtprob$probAB_C
corAa <- 1/sqrt(2)
corAab <- 1/sqrt(2)
coraab <- 1/2
dig <- 2
alpha <- 0.05
crit12 <- crit2x2(corAa, corAab, coraab, dig, alpha)$crit12
n <- 4600
power12_12(n, hrA, hrAB, probA_C, probAB_C,
crit12, cormat = matrix(c(1,0.5,0.5,1), byrow = TRUE, nrow = 2),
niter = 1, abseps = 1e-03)
# $powerA
# [1] 0.6203837
# $powerAB
# [1] 0.9226679
# $powerAandAB
# [1] 0.6018828
# $power12.12
# [1] 0.9411688
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.