This function defines settings for outbreaker. It takes a list of named items as input, performs various checks, set defaults where arguments are missing, and return a correct list of settings. If no input is given, it returns the default settings.
create_config(..., data = NULL)# S3 method for outbreaker_config
print(x, ...)
further arguments to be passed to other methods.
an optional list of data items as returned by
outbreaker_data; if provided, this allows for further checks of
the outbreaker settings.
an outbreaker_config object as returned by create_config.
Thibaut Jombart (thibautjombart@gmail.com).
Acceptables arguments for ... are:
the tree used to initialize the MCMC. Can be either a
character string indicating how this tree should be computed, or a vector of
integers corresponding to the tree itself, where the i-th value corresponds
to the index of the ancestor of 'i' (i.e., init.tree[i] is the
ancestor of case i). Accepted character strings are "seqTrack" (uses
seqTrack algorithm to generate the initial tree - see function
seqTrack in the package adegenet), "random" (ancestor randomly
selected from preceding cases), and "star" (all cases coalesce to the first
case). Note that for SeqTrack, all cases should have been sequenced.
a vector of integers indicating the initial values of
alpha, where the i-th value indicates the ancestor of case 'i'; defaults to
NULL, in which ancestries are defined from init_tree.
a (recycled) vector of integers indicating the initial values of kappa; defaults to 1.
a vector of integers indicating the initial values of
t_inf, i.e. dates of infection; defaults to NULL, in which case
the most likely t_inf will be determined from the delay to
reporting/symptoms distribution, and the dates of reporting/symptoms,
provided in data.
initial value for the mutation rates.
initial value for the reporting probability.
initial value for the contact reporting coverage.
initial value for the non-infectious contact rate.
an integer indicating the number of iterations in the MCMC, including the burnin period.
a vector of logicals indicating, for each case, if the ancestry should be estimated ('moved' in the MCMC), or not, defaulting to TRUE; the vector is recycled if needed.
a vector of logicals indicating, for each case, if the dates of infection should be estimated ('moved' in the MCMC), or not, defaulting to TRUE; the vector is recycled if needed.
a logical indicating whether the mutation rates should be estimated ('moved' in the MCMC), or not, all defaulting to TRUE.
a logical indicating whether the reporting probability should be estimated ('moved' in the MCMC), or not, all defaulting to TRUE.
a logical indicating whether the contact reporting coverage should be estimated ('moved' in the MCMC), or not at all, defaulting to TRUE.
a logical indicating whether the non-infectious contact rate should be estimated ('moved' in the MCMC), or not at all, defaulting to TRUE.
a logical indicating whether the number of generations between two successive cases should be estimated ('moved' in the MCMC), or not, all defaulting to TRUE.
a logical indicating whether the reporting probability should be estimated ('moved' in the MCMC), or not, all defaulting to TRUE.
the number of iterations of the MCMC.
the frequency at which MCMC samples are retained for the output.
the standard deviation for the Normal proposal for the mutation rates.
the standard deviation for the Normal proposal for the reporting probability.
the standard deviation for the Normal proposal for the contact reporting coverage.
the standard deviation for the Normal proposal for the non-infectious contact rate.
the proportion of ancestries to move at each iteration of the MCMC.
the proportion of infection dates to move at each iteration of the MCMC.
the size of the batch of random number pre-generated.
a logical indicating if the paranoid mode should be used; this mode is used for performing additional tests during outbreaker; it makes computations substantially slower and is mostly used for debugging purposes.
earliest infection date possible, expressed as days since the first sampling.
an integer indicating the largest number of generations between any two linked cases; defaults to 5.
a numeric value indicating the rate of the exponential prior for the mutation rate 'mu'.
a numeric vector of length 2 indicating the first and second parameter of the beta prior for the reporting probability 'pi'.
a numeric vector of length 2 indicating the first and second parameter of the beta prior for the contact reporting coverage 'eps'.
a numeric vector of length 2 indicating the first and second parameter of the beta prior for the non-infectious contact rate 'lambda'.
a logical indicating if the contact tracing data is directed or not. If yes, the first column represents the infector and the second column the infectee. If ctd is provided as an epicontacts objects, directionality will be taken from there.
a logical indicating whether negative serial intervals are epidemiologically possible. If not, ancestries with negative serial intervals are discarded.
a logical indicating if a progress bar should be displayed.
outbreaker_data to check and process data for outbreaker.
## see default settings
create_config()
## change defaults
create_config(move_alpha = FALSE, n_iter = 2e5, sample_every = 1000)
Run the code above in your browser using DataLab