Skip to contents

Runs repeated simulations under user-specified data-generating scenarios to estimate power, type I error rate, bias, and coverage for one or more borrowing methods.

Usage

run_simulation(simulation_obj, quiet = TRUE)

Arguments

simulation_obj

A simulation object created by setup_simulation_primary or setup_simulation_OLE.

quiet

Logical. If TRUE, suppress iteration output.

Value

A simulation report object containing estimated power, type I error rate, and related operating characteristics for each method.

Details

Six borrowing methods are available:

ec_ipw

Inverse probability weighting (primary analysis).

ec_aipw

Augmented inverse probability weighting (primary analysis).

did_ec_ipw

Difference-in-differences with IPW (open-label extension).

did_ec_aipw

Difference-in-differences with AIPW (open-label extension).

did_ec_or

Difference-in-differences with outcome regression (open-label extension).

scm

Synthetic control method (open-label extension).

See also

run_analysis for analyzing a single dataset.

Examples

if (FALSE) { # \dontrun{
method <- ec_ipw(ps_formula = "S ~ x1 + x2 + x3 + x4 + x5")
sim <- setup_simulation_primary(
  n_sim = 500,
  method_obj_list = list(method),
  ...
)
run_simulation(sim)
} # }