| run_simulation | R Documentation |
For each of nsim replicates, simulates a hybrid-control Cox
dataset and fits all borrowing methods. Returns per-replicate raw
results and aggregated summaries under both model-based and
sandwich inference.
run_simulation(
nsim = 200,
scenario,
lambdas,
alpha = 0.025,
one_sided = TRUE,
seed = 1,
parallel = FALSE,
ncores = NULL,
robust = FALSE,
eps = SMOOTH_EPS,
n_grid_opt = DEFAULT_N_GRID_OPT
)
nsim |
Number of Monte Carlo replicates, at least two. |
scenario |
A list of data-generating parameters with elements
|
lambdas |
A list of tuning parameters with elements
|
alpha |
Nominal one-sided (or two-sided) significance level. |
one_sided |
Logical; if |
seed |
RNG seed. |
parallel |
Logical; if |
ncores |
Number of workers; |
robust |
Use robust (Lin-Wei) Cox standard errors. |
eps |
Smoothing parameter for |
n_grid_opt |
Number of grid points for the coarse search in non-convex objectives. |
A list with:
rawPer-replicate results data frame.
summaryAggregated summaries for both inference
types (valid-result counts, Monte Carlo standard errors, rejection rate,
bias, RMSE, empirical SE, average SE,
95% coverage), with an inference column.
scenario, lambdas, settingsThe inputs and run metadata.
sim_out <- run_simulation(nsim = 2, scenario = scenario_S1,
lambdas = lambdas_default, alpha = 0.025, seed = 1)
subset(sim_out$summary, inference == "sandwich")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.