simulate_batch: Run a batch of simulations

Description Usage Arguments Value Author(s) Examples

Description

To use mclapply2 from bt88.03.704 you have to install this library (e.g. devtools::install_github('floatofmath/bt88.03.704')) unfortunately the statusbar implementation does not work with Rstudio.

Usage

1
2
simulate_batch(scenarios, runs, run_scenario, ..., drop = TRUE,
  multicore = TRUE, use_mclapply2 = FALSE)

Arguments

scenarios

Object with paramter settings for delta, sigma and n1 in each row

runs

Number of simulation runs for each scenario

run_scenario

Function that runs a single parameter scenario, takes at least the columns of G and runs as arguments

...

Additional named arguments for run_scenario

drop

should columns that start with "result" or "select" or be dropped (which may have been added by simulate_batch, or select_results)

multicore

Should multicore parallelisation be used

use_mclapply2

use mclapply2 from package bt88.03.704 which implements a status bar (see details)

Value

Object with parameters and simulation results in each row

Author(s)

Florian Klinglmueller

Examples

1
2
scenarios <- expand.grid(m=c(0,1),s=c(1,2))
simulate_batch(scenarios,10000,simulate_poly,n=10)

floatofmath/casino documentation built on May 16, 2019, 1:21 p.m.