SupProb {PracticalEquiDesign} | R Documentation |
Superiority Probability
Description
Probability of selecting the more effective treatment as pr(median2 - median1 >= margin) + 0.5 * pr(abs(median2 - median1) < margin).
Usage
SupProb(
cens_prop,
n,
med1 = NULL,
shape1 = NULL,
rate1 = NULL,
med2 = NULL,
shape2 = NULL,
rate2 = NULL,
info_reps = 50,
margin = 0,
use_exp_calc = TRUE
)
Arguments
cens_prop |
Expected censoring proportion. |
n |
Sample size. |
med1 |
Median for treatment arm 1, assuming shape1 = 1. Overwrites shape and rate if supplied. |
shape1 |
Shape parameter for arm 1. |
rate1 |
Rate parameter for arm 1. |
med2 |
Median for treatment arm 2, assuming shape2 = 1. Overwrites shape and rate if supplied. |
shape2 |
Shape parameter for arm 2. |
rate2 |
Rate parameter for arm 2. |
info_reps |
Replicates used for estimating the observed information matrix. |
margin |
Margin of practical equivalence. |
use_exp_calc |
If both shape parameters are 1, should the calculations be performed assuming an exponential distribution for the time to event in each arm? Default is TRUE. |
Value
Numeric equivalence probability.
Examples
# Calculation in the case of exponentials with no margin.
prob <- SupProb(
cens_prop = 0.15,
n = 100,
med1 = 9,
med2 = 12,
)
# Calculation in the case of exponentials with a 2 month margin.
# The probability should be lower than in the absence of a margin.
prob <- SupProb(
cens_prop = 0.15,
n = 100,
med1 = 9,
med2 = 12,
margin = 2
)
# Calculation in the case of Weibulls with a 2 month margin.
prob <- SupProb(
cens_prop = 0.15,
n = 100,
shape1 = 2.8,
rate1 = 0.10,
shape2 = 4.0,
rate2 = 0.08,
margin = 2
)
[Package PracticalEquiDesign version 0.0.3 Index]