Description Usage Arguments Details Value
View source: R/feasibility_check.R
Functions to check feasibility of a design, adjust the design in order to make it feasible, or adjust the constraints so that they can be achieved. Here, "feasibility" means that there exists a 1-stage design at the supplied sample size that meets the supplied power and Type I error constraints.
1 2 3 4 5 6 7 8 | feasibility_check(FWER, p1, trial_method, r1 = 0.5, r2 = 1 - r1, n_total,
cases, npoints_sqrt = 10, trial_args = list())
min_n_feasible(min_n = 100, max_n = min_n * 10, step_n = 5,
showiter = FALSE, trial_method, ...)
max_power_feasible(n_total, cases, p1, trial_method, step_multiplier = 0.01,
showiter = FALSE, FWER = 0.025, npoints_sqrt = 10, ...)
|
FWER |
the required familywise Type I error rate for the trial |
p1 |
population proportion in subpopulation 1 |
trial_method |
the type of trial to run. 'cov' for covariance based, 'MB' for Maurer Bretz, and 'covMB' for a combination approach. |
r1 |
probability of being randomized to treatment in subpopulation 1 |
r2 |
probability of being randomized to treatment in subpopulation 2 |
n_total |
the total sample size for the 1-stage trial |
cases |
a list of power constraints, of the same format as those passed to |
npoints_sqrt |
|
trial_args |
either an empty list (for trial_method=='cov'), or a list containing graph edges for alpha reallocation (for trial_method=='MB'). |
min_n |
smallest sample size to consider for a 1-stage trial |
max_n |
largest sample size to consider |
step_n |
the step size for sample size. For example, if |
showiter |
passed to |
... |
passed to |
step_multiplier |
the step size |
feasibility_check
checks whether it is possible to meet a set of power constraints while maintaining a given familywise Type I error rate (FWER) and total sample size.
min_n_feasible
implements a binary search to find the smallest sample size that meets the power constraints and FWER specified. In each iteration of the search, min_n_feasible
calls feasibility_check
.
Given a sample size and set of power cases, max_power_feasible
finds the number m between 0 and 1 such that if all of the minimum power thresholds are multiplied by m, then these power constraints will be satisfied at the supplied value of n_total
. In other words, it finds the factor by which the power constraints must be relaxed.
feasibility_check
returns a named vector, with the first element being 1 if the trial is feasible, and zero otherwise. The remaining elements of this vector tell the alpha allocated to each hypothesis in one particular setup that results in a feasible trial.
min_n_feasible
returns the smallest sample size that meets the power constraints and FWER specified, as well as the output from feasibility_check
at that sample size.
max_power_feasible
returns the multiplier m and a list of modified cases in which each power threshold has been multiplied by m.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.