create_config.Rd
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 

data  an optional list of data items as returned by

x  an 
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 ith 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 ith 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 noninfectious 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 noninfectious 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 noninfectious 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 pregenerated
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 noninfectious 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 if a progress bar should be displayed
outbreaker_data
to check and process data for outbreaker
## see default settings create_config()#> #> #> ///// outbreaker settings /// #> #> class: outbreaker_config list #> number of items: 37 #> #> /// initialisation // #> init_tree init_mu init_kappa init_pi init_eps init_lambda #> seqTrack 1e04 1 0.9 0.5 0.05 #> #> /// movements // #> move_alpha move_swap_cases move_t_inf move_mu move_kappa #> TRUE TRUE TRUE TRUE TRUE #> move_pi move_eps move_lambda prop_alpha_move prop_t_inf_move #> TRUE TRUE TRUE 0.25 0.2 #> sd_mu sd_pi sd_eps sd_lambda #> 1e04 0.1 0.1 0.05 #> #> /// chains // #> n_iter sample_every #> 10000 50 #> #> /// priors // #> prior_mu prior_pi1 prior_pi2 prior_eps1 prior_eps2 #> 1 10 1 1 1 #> prior_lambda1 prior_lambda2 #> 1 1 #> #> /// imported cases // #> find_import n_iter_import sample_every_import outlier_threshold #> TRUE 5000 50 5 #> #> /// other settings // #> paranoid min_date max_kappa ctd_directed pb #> FALSE 10 5 FALSE FALSE## change defaults create_config(move_alpha = FALSE, n_iter = 2e5, sample_every = 1000)#> #> #> ///// outbreaker settings /// #> #> class: outbreaker_config list #> number of items: 37 #> #> /// initialisation // #> init_tree init_mu init_kappa init_pi init_eps init_lambda #> seqTrack 1e04 1 0.9 0.5 0.05 #> #> /// movements // #> move_alpha move_swap_cases move_t_inf move_mu move_kappa #> FALSE TRUE TRUE TRUE TRUE #> move_pi move_eps move_lambda prop_alpha_move prop_t_inf_move #> TRUE TRUE TRUE 0.25 0.2 #> sd_mu sd_pi sd_eps sd_lambda #> 1e04 0.1 0.1 0.05 #> #> /// chains // #> n_iter sample_every #> 2e+05 1000 #> #> /// priors // #> prior_mu prior_pi1 prior_pi2 prior_eps1 prior_eps2 #> 1 10 1 1 1 #> prior_lambda1 prior_lambda2 #> 1 1 #> #> /// imported cases // #> find_import n_iter_import sample_every_import outlier_threshold #> TRUE 5000 50 5 #> #> /// other settings // #> paranoid min_date max_kappa ctd_directed pb #> FALSE 10 5 FALSE FALSE