abc_smc_prep: ABC-SMC Slurm Model Preparation

Description Usage Arguments

View source: R/slurm.R

Description

This is the first step in the ABC-SMC Slurm workflow.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
abc_smc_prep(
  model,
  prior,
  nsims,
  summary_stat_target,
  prior_test = NULL,
  ncores = 2,
  dist_weights = NULL,
  alpha = 0.5,
  ...
)

Arguments

model

a R function implementing the model to be simulated. It must take as arguments a vector of model parameter values and it must return a vector of summary statistics.

prior

a list of prior information. Each element of the list corresponds to a model parameter. The list element must be a vector whose first argument determines the type of prior distribution.

nsims

the number of simulations below the tolerance threshold is equal to nsims * alpha.

summary_stat_target

a vector containing the targeted (observed) summary statistics.

prior_test

a string expressing the constraints between model parameters. This expression will be evaluated as a logical expression, you can use all the logical operators including "<", ">", .... Each parameter should be designated with "X1", "X2", ... in the same order as in the prior definition. If not provided, no constraint will be applied.

ncores

Number of cores per node (defines a batch size).

dist_weights

a vector containing the weights to apply to the distance between the computed and the targeted statistics. These weights can be used to give more importance to a summary statistisc for example. The weights will be normalized before applying them. If not provided, no weights will be applied.

alpha

Number of simulations to retain in waves 1+.

...

Additional arguments can be passed depending on the choosen method (see below).


EpiModel/EasyABCMPI documentation built on Dec. 5, 2020, 8:43 p.m.