# NOT RUN {
# Corresponds to scenario 4 in Table 2 from Leifer, Troendle, et al. (2019).
n <- 4600
rateC <- 0.0445
hrA <- 0.80
hrB <- 0.80
hrAB <- 0.72
mincens <- 4.0
maxcens <- 8.4
fac2x2design(n, rateC, hrA, hrB, hrAB, mincens, maxcens, dig = 2, alpha = 0.05, niter = 1)
# $events
# [1] 954.8738
# $evtprob
# probC probA probB probAB
# 0.2446365 0.2012540 0.2012540 0.1831806
# $powerEA3overallA
# [1] 0.5861992
# $powerEA3simpleA
# [1] 0.5817954
# $powerEA3simplAB
# [1] 0.9071236
# $powerEA3anyA
# [1] 0.7060777
# $powerPA2overallA
# [1] 0.6582819
# $powerPA2simpleAB
# [1] 0.9197286
# $powerEA2simpleA
# [1] 0.6203837
#
# $powerEA2simpleAB
# [1] 0.9226679
# $powerA
# [1] 0.7182932
# $powerB
# [1] 0.7182932
# }
Run the code above in your browser using DataLab