min_n_multistage: Find the smallest total sample size such that a multi-stage...

Description Usage Arguments Details Value References See Also

View source: R/feasibility_check.R

Description

Takes as input a list of arguments (args) that define an adaptive trial (see buildTrial or optimizeTrial). This function adjusts the n_total argument in order to find the smallest maximum sample size that meets the power constraints specified in the cases argument.

Usage

1
2
min_n_multistage(args, cases, trial_method, objective_fun, min_n = 1,
  max_n = min_n * 1000, step_n = 10, showiter = FALSE)

Arguments

args

a list containing a subset of the arguments for the functions getEffBounds and simTrial (or comparable functions, see trial_method argument). This should include a FWER constraint.

cases

A list of power constraints, in the same format as those sent to optimizeTrial

trial_method

either 'cov' or 'MB' for Maurer-Bretz (2013).

objective_fun

see optimizeTrial

min_n

The smallest sample size to consider

max_n

The largest sample size to consider

step_n

The step size to consider when carrying out the binary search. For example, if step_n = 10, min_n=0, and max_n=100, the function will find the smallest n_total satisfying the supplied constraints, and that is also a multiple of 10.

showiter

passed to binsearch

Details

This function requires that the objective function contain a 'base' element, and a 'power_diffs' element that is nonnegative when power constraints are met. For example, see min_E_SS_power_constraints.

Value

A list containing

n

The smallest feasible n_total

soln

Output from binsearch

.

References

Maurer, W. and F. Bretz (2013). Multiple testing in group sequential trials using graphical approaches. Statistics in Biopharmaceutical Research.

See Also

min_n_feasible, feasibility_check


aaronjfisher/designOptim documentation built on May 21, 2019, 8:35 a.m.