run_sims: Multiple path simulations over a range of input parameters

Description Usage Arguments Value

View source: R/sim-functions.R

Description

This function calls build_tree over a range of input parameters. It computes nsim replications for each unique combination of input parameters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
run_sims(
  nsim = 10,
  nstart = 1,
  tmax = 100,
  tbar = 10,
  p = 0.5,
  lambda = 0.11,
  kappa = 1,
  q = 0.6,
  mbar = 5,
  kappaq = 3,
  ceil = Inf
)

Arguments

nsim

A non-negative integer. The number of replications for each set of input parameters.

...

Input parameters for add_layer. Each input parameter can receive a vector with multiple values. If that is the case, then all input parameters should have the same length, or one.

Value

A tibble with a column for each input parameter, and a list-column treelist. This is a list of lists of lists. Each sublist corresponds to a unique combination of input parameters, and contains nsim trees (i.e. simulated paths). Each individual tree is itself a list of tibbles, with one tibble for each simulation layer.


pspc-data-science/branchsim documentation built on Jan. 19, 2021, 10:10 a.m.