Diff of /man/custom_moves.Rd [000000] .. [dfe06d]

Switch to unified view

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