[dfe06d]: / man / custom_moves.Rd

Download this file

88 lines (68 with data), 3.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/custom_moves.R
\name{custom_moves}
\alias{custom_moves}
\alias{print.outbreaker_moves}
\title{Customise samplers for outbreaker}
\usage{
custom_moves(...)
\method{print}{outbreaker_moves}(x, ...)
}
\arguments{
\item{...}{A list or a series of named, comma-separated functions
implementing movements of parameters or augmented data.}
\item{x}{an \code{outbreaker_moves} object as returned by \code{create_moves}.}
}
\value{
A list of movement functions with a single argument 'param', with
class \code{outbreaker_moves}.
}
\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:
}
\details{
\itemize{
\item \code{mu}: movement of the mutation rate; by default, the function
\code{cpp_move_mu} is used.
\item \code{pi}: movement of the reporting probability; by default, the function
\code{cpp_move_pi} is used.
\item \code{eps}: movement of the contact reporting coverage; by default, the
function \code{cpp_move_eps} is used.
\item \code{lambda}: the movement of the non-infectious contact rate; the
function \code{cpp_move_lambda} is used.
\item \code{alpha}: movement of the transmission tree, by randomly proposing
infectors in the pool of cases infected before; by default, the function
\code{cpp_move_alpha} is used.
\item \code{swap_cases}: movement of the transmission tree, by swapping
infectors and infected cases; by default, the function
\code{cpp_move_swap_cases} is used.
\item \code{t_inf}: movement of the date of infection; by default, the
function \code{cpp_move_t_inf} is used.
\item \code{kappa}: movement of the number generations between cases; by
default, the function \code{cpp_move_kappa} is used.
}
Movement functions must have an argument \code{param}, which is a list of
parameters and augmented data of the class \code{\link{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:
\itemize{
\item \code{data}: a list of named items containing input data as returned by
\code{\link{outbreaker_data}}
\item \code{config}: a list of named items containing input data as returned by
\code{\link{create_config}}
\item \code{likelihoods}: a list of named custom likelihood functions as returned by
\code{\link{custom_likelihoods}}
\item \code{priors}: a list of named custom prior functions as returned by
\code{\link{custom_priors}}
}
}
\seealso{
See \href{http://www.repidemicsconsortium.org/outbreaker2/articles/customisation.html#customising-movements}{customization vignette} for detailed examples on how to customise movement functions.
}
\author{
Thibaut Jombart (\email{thibautjombart@gmail.com}).
}