ciapower.Rd
Uses the method of Peterson and George to compute the power of an
interaction test in a 2 x 2 setup in which all 4 distributions are
exponential. This will be the same as the power of the Cox model
test if assumptions hold. The test is 2-tailed.
The duration of accrual is specified
(constant accrual is assumed), as is the minimum follow-up time.
The maximum follow-up time is then accrual + tmin
. Treatment
allocation is assumed to be 1:1.
ciapower(tref, n1, n2, m1c, m2c, r1, r2, accrual, tmin,
alpha=0.05, pr=TRUE)
time at which mortalities estimated
total sample size, stratum 1
total sample size, stratum 2
tref-year mortality, stratum 1 control
tref-year mortality, stratum 2 control
% reduction in m1c
by intervention, stratum 1
% reduction in m2c
by intervention, stratum 2
duration of accrual period
minimum follow-up time
type I error probability
set to FALSE
to suppress printing of details
power
prints
Peterson B, George SL: Controlled Clinical Trials 14:511–522; 1993.
# Find the power of a race x treatment test. 25% of patients will
# be non-white and the total sample size is 14000.
# Accrual is for 1.5 years and minimum follow-up is 5y.
# Reduction in 5-year mortality is 15% for whites, 0% or -5% for
# non-whites. 5-year mortality for control subjects if assumed to
# be 0.18 for whites, 0.23 for non-whites.
n <- 14000
for(nonwhite.reduction in c(0,-5)) {
cat("\n\n\n% Reduction in 5-year mortality for non-whites:",
nonwhite.reduction, "\n\n")
pow <- ciapower(5, .75*n, .25*n, .18, .23, 15, nonwhite.reduction,
1.5, 5)
cat("\n\nPower:",format(pow),"\n")
}
#>
#>
#>
#> % Reduction in 5-year mortality for non-whites: 0
#>
#>
#> Accrual duration: 1.5 y Minimum follow-up: 5 y
#>
#> Sample size Stratum 1: 10500 Stratum 2: 3500
#>
#> Alpha= 0.05
#>
#> 5-year Mortalities
#> Control Intervention
#> Stratum 1 0.18 0.153
#> Stratum 2 0.23 0.230
#>
#> Hazard Rates
#> Control Intervention
#> Stratum 1 0.03969019 0.03321092
#> Stratum 2 0.05227295 0.05227295
#>
#> Probabilities of an Event During Study
#> Control Intervention
#> Stratum 1 0.2039322 0.1737512
#> Stratum 2 0.2594139 0.2594139
#>
#> Expected Number of Events
#> Control Intervention
#> Stratum 1 1070.6 912.2
#> Stratum 2 454.0 454.0
#>
#> Ratio of hazard ratios: 0.8367538
#> Standard deviation of log ratio of ratios: 0.08022351
#>
#>
#> Power: 0.6032173
#>
#>
#>
#> % Reduction in 5-year mortality for non-whites: -5
#>
#>
#> Accrual duration: 1.5 y Minimum follow-up: 5 y
#>
#> Sample size Stratum 1: 10500 Stratum 2: 3500
#>
#> Alpha= 0.05
#>
#> 5-year Mortalities
#> Control Intervention
#> Stratum 1 0.18 0.1530
#> Stratum 2 0.23 0.2415
#>
#> Hazard Rates
#> Control Intervention
#> Stratum 1 0.03969019 0.03321092
#> Stratum 2 0.05227295 0.05528250
#>
#> Probabilities of an Event During Study
#> Control Intervention
#> Stratum 1 0.2039322 0.1737512
#> Stratum 2 0.2594139 0.2720973
#>
#> Expected Number of Events
#> Control Intervention
#> Stratum 1 1070.6 912.2
#> Stratum 2 454.0 476.2
#>
#> Ratio of hazard ratios: 0.7912015
#> Standard deviation of log ratio of ratios: 0.07958098
#>
#>
#> Power: 0.8371925