run_sim: Run simulation

View source: R/run_sim.R

run_simR Documentation

Run simulation

Description

Run simulation

Usage

run_sim(
  sim_pars,
  covar_def,
  outcome_pars,
  models,
  mis_scenarios = NULL,
  sim_name = NULL,
  scenarios = NULL,
  batch_size = 10,
  batch_numbers = NULL,
  path = NULL,
  packages = NULL,
  skip_fit = FALSE
)

Arguments

sim_pars

list of simulation parameters

covar_def

expression defining covariates

outcome_pars

list of parameters to create covariates and outcome

models

list of model specifications

mis_scenarios

list of missingness scenarios

sim_name

optional character string used in naming the output folder

batch_size

optional; number of simulations per batch (will be saved in separate file)

batch_numbers

optional index numbers of the batches of simulations to be run (in order to only run a subset)

path

where to save the results (file name will be generated automatically)

packages

optional character vector of packages passed to .packages in foreach::foreach

skip_fit

logical; should the step in which the models are fitted be skipped (to only get the simulated data)?


NErler/simvalidator documentation built on May 17, 2022, 7:54 a.m.