singlearmDesign {curtailment} | R Documentation |
Find single-arm trials using stochastic curtailment
Description
This function finds admissible design realisations for single-arm binary outcome trials, using stochastic curtailment. The output can be used as the sole argument in the function 'drawDiagram', which will return the stopping boundaries for the admissible design of your choice. Monitoring frequency can set in terms of block(/cohort) size ("C") or number of stages ("stages").
Usage
singlearmDesign(
nmin,
nmax,
C = NA,
stages = NA,
p0,
p1,
alpha,
power,
minstop = 1,
maxthetaF = p1,
minthetaE = p1,
bounds = "wald",
return.only.admissible = TRUE,
max.combns = 1e+06,
maxthetas = NA,
fixed.r = NA,
exact.thetaF = NA,
exact.thetaE = NA,
progressBar = FALSE
)
Arguments
nmin |
Smallest maximum sample size. Should be a multiple of block size or number of stages. |
nmax |
Largest maximum sample size. Should be a multiple of block size or number of stages. |
C |
Block size. Vectors, i.e., multiple values, are permitted. |
stages |
Number of interim analyses or "stages". Only required if not setting block size C. Vectors, i.e., multiple values, are permitted. |
p0 |
Probability for which to control the type-I error-rate |
p1 |
Probability for which to control the power |
alpha |
Significance level |
power |
Required power (1-beta). |
minstop |
Minimum permitted sample size at the first interim analysis |
maxthetaF |
Maximum value of lower CP threshold theta_F_max. Defaults to p1. |
minthetaE |
Minimum value of upper threshold theta_E_min. Defaults to p1. |
bounds |
choose what final rejection boundaries should be searched over: Those of A'Hern ("ahern"), Wald ("wald") or no constraints (NA). Defaults to "wald". |
return.only.admissible |
Logical. Returns only admissible design realisations if TRUE, otherwise returns all feasible designs. Defaults to TRUE. |
max.combns |
Provide a maximum number of ordered pairs (theta_F, theta_E). Defaults to 1e6. |
maxthetas |
Provide a maximum number of CP values used to create ordered pairs (theta_F, theta_E). Can be used instead of max.combns. Defaults to NA. |
fixed.r |
Choose what final rejection boundaries should be searched over. Useful for reproducing a particular design realisation. Defaults to NA. |
exact.thetaF |
Provide an exact value for lower threshold theta_F. Useful for reproducing a particular design realisation. Defaults to NA. |
exact.thetaE |
Provide an exact value for upper threshold theta_E. Useful for reproducing a particular design realisation. Defaults to NA. |
progressBar |
Logical. If TRUE, shows progress bar. Defaults to FALSE. |
Value
Output is a list of two dataframes. The first, $input, is a one-row data frame that contains all the arguments used in the call. The second, $all.des, contains the operating characteristics of all admissible designs found.
Author(s)
Martin Law, martin.law@mrc-bsu.cam.ac.uk
Examples
output <- singlearmDesign(nmin = 30,
nmax = 30,
C = 5,
p0 = 0.1,
p1 = 0.4,
power = 0.8,
alpha = 0.05)