This function is used to specify customised movement functions (a.k.a. samplers) for outbreaker. Custom functions are specified as a named list or series of comma-separated, named arguments, indicating which type of movement they implement. Values currently available are:
custom_moves(...)
A named list of movement functions with a single argument 'param', with
class outbreaker_moves
.
A list or a series of named, comma-separated functions implementing movements of parameters or augmented data.
Initial version by Thibaut Jombart, rewritten by Alexis Robert (alexis.robert@lshtm.ac.uk)
pi
: movement of the reporting probability; by default, the function
cpp_move_pi
is used.
a
: movement of the first spatial parameter; by default, the function
cpp_move_a
is used.
b
: movement of the second spatial parameter; by default, the function
cpp_move_b
is used.
alpha
: movement of the transmission tree, by randomly proposing
infectors in the pool of cases infected before; by default, the function
cpp_move_alpha
is used.
swap_cases
: movement of the transmission tree, by swapping
infectors and infected cases; by default, the function
cpp_move_swap_cases
is used.
ancestors
: movement of the transmission tree, by changing
the ancestors of the different trees in a cluster; by default, the function
cpp_move_ancestors
is used.
t_inf
: movement of the date of infection; by default, the
function cpp_move_t_inf
is used.
kappa
: movement of the number generations between cases; by
default, the function cpp_move_kappa
is used.
Movement functions must have an argument param
, which is a list of
parameters and augmented data of the class create_param
.
Each movement function will be enclosed with its other arguments, so that the
resulting function will have a single argument 'param'. For non-standard
movements (i.e. none of the names specified above), the closure will contain:
data
: a list of named items containing input data as returned by
outbreaker_data
config
: a list of named items containing input data as returned by
create_config
likelihoods
: a list of named custom likelihood functions as returned by
custom_likelihoods
priors
: a list of named custom prior functions as returned by
custom_priors