Description Usage Arguments Value See Also Examples
View source: R/des_two_stage.R
des_two_stage
determines two-stage two-arm randomised clinical trial
designs, assuming the primary outcome variable is Bernoulli distributed. It
supports a flexible framework for specifying which scenarios to control the
type-I and type-II error-rates for, and allows for design determination
assuming a variety of test statistics. In all instances, des_two_stage
computes the optimal required sample size in each arm in each stage, the
associated optimal stopping boundaries, and returns information on key
operating characteristics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | des_two_stage(
type = "binomial",
alpha = 0.1,
beta = 0.2,
delta = 0.2,
ratio = 1,
Pi0 = 0.1,
Pi1 = Pi0[1],
nCmax = 50L,
equal = T,
w = c(1, 0, 0, 0, 0),
piO = Pi0[1],
efficacy = FALSE,
futility = TRUE,
efficacy_type = 0L,
efficacy_param = NULL,
futility_type = 1L,
futility_param = 0L,
summary = FALSE
)
|
type |
A |
alpha |
A |
beta |
A |
delta |
A |
ratio |
A |
Pi0 |
A |
Pi1 |
A |
nCmax |
A |
equal |
A |
w |
A |
piO |
A |
efficacy |
Only used if |
futility |
Only used if |
efficacy_type |
Only used if |
efficacy_param |
Only used if |
futility_type |
Only used if |
futility_param |
Only used if |
summary |
A |
A list
with additional class "ph2rand_des"
,
containing each of the input parameters along with several additional
variables, including
A list
in the slot $boundaries
giving the
rejection boundaries of the optimal design. The names of these elements
depends on the value of type
.
A tibble
in the slot $feasible
summarising the
operating characteristics of the feasible designs.
A numeric
vector
in the slot $nC
giving the sample sizes in the control arm in each stage for the optimal
design.
A numeric
vector
in the slot $nE
giving the sample sizes in the experimental arm in each stage for the optimal
design.
A tibble
in the slot $opchar
summarising the
operating characteristics of the optimal design.
des_one_stage
, opchar
,
pmf
, terminal
, plot.ph2rand_des
,
summary.ph2rand_des
.
1 2 3 4 5 6 | # The design for the default parameters
des <- des_two_stage()
# Controlling the type-I/II error-rates over a range of possible response
# rates
des_range <- des_two_stage(Pi0 = c(0, 1),
Pi1 = c(0, 0.8))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.