| custom_moves {outbreaker2} | R Documentation |
Customise samplers for outbreaker
Description
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:
Usage
custom_moves(...)
## S3 method for class 'outbreaker_moves'
print(x, ...)
Arguments
... |
A list or a series of named, comma-separated functions implementing movements of parameters or augmented data. |
x |
an |
Details
-
mu: movement of the mutation rate; by default, the functioncpp_move_muis used. -
pi: movement of the reporting probability; by default, the functioncpp_move_piis used. -
eps: movement of the contact reporting coverage; by default, the functioncpp_move_epsis used. -
lambda: the movement of the non-infectious contact rate; the functioncpp_move_lambdais used. -
alpha: movement of the transmission tree, by randomly proposing infectors in the pool of cases infected before; by default, the functioncpp_move_alphais used. -
swap_cases: movement of the transmission tree, by swapping infectors and infected cases; by default, the functioncpp_move_swap_casesis used. -
t_inf: movement of the date of infection; by default, the functioncpp_move_t_infis used. -
kappa: movement of the number generations between cases; by default, the functioncpp_move_kappais 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 byoutbreaker_data -
config: a list of named items containing input data as returned bycreate_config -
likelihoods: a list of named custom likelihood functions as returned bycustom_likelihoods -
priors: a list of named custom prior functions as returned bycustom_priors
Value
A list of movement functions with a single argument 'param', with
class outbreaker_moves.
Author(s)
Thibaut Jombart (thibautjombart@gmail.com).
See Also
See customization vignette for detailed examples on how to customise movement functions.