View source: R/study_wrapper.R
| run_drift_curve | R Documentation |
For each drift value in drift_set, runs a simulation under
the supplied theta0 (e.g. 0 for type I error, log(0.8)
for power) and the given tuning parameters, then returns a stacked
summary across drift values. The reference internal randomized sample
size used for ESS is taken as nI1 + nI0 from
scenario_base.
run_drift_curve(
theta0,
drift_set,
scenario_base,
lambdas,
nsim = 1000,
alpha = 0.025,
seed = 1,
parallel = FALSE,
ncores = NULL,
robust = FALSE,
eps = SMOOTH_EPS,
n_grid_opt = DEFAULT_N_GRID_OPT,
keep_raw = FALSE
)
theta0 |
True treatment effect (log HR) used in the simulations. |
drift_set |
Numeric vector of drift values (log HR). |
scenario_base |
A scenario list. |
lambdas |
Tuning list (as in |
nsim |
Number of replicates per drift value. |
alpha |
Nominal level. |
seed |
RNG seed (per-drift offsets are added internally). |
parallel, ncores, robust, eps, n_grid_opt |
As in
|
keep_raw |
Retain replicate estimates. Defaults to |
By default a data frame of per-drift summaries. With
keep_raw = TRUE, a list with summary and raw.
Replicate IDs are unique within each drift_index and method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.