Description Usage Arguments Value Author(s) Examples
This function creates initial outputs and parameter states for outbreaker.
1  create_param(data = outbreaker_data(), config = create_config())

data 
A list of data items as returned by 
config 
A list of settings as returned by 
A list containing two components $store
and
$current
. store
is a list with the class
outbreaker_store
, used for storing 'saved' states of the
MCMC. current
is a list with the class outbreaker_param
, used
for storing 'current' states of the MCMC.
outbreaker_store
class content:
size
: The length of the list, corresponding to the number of
samples saved from the MCMC.
step
: A vector of integers of length size
, storing the
steps of the MCMC corresponding to the saved samples.
post
: A numeric vector of length size
, storing
logposterior values.
like
: A numeric vector of length size
, storing
loglikelihood values.
prior
: A numeric vector of length size
,
storing logprior values.
alpha
: A list of length size
. Each item of the list is
an integer vector of length data$N
, storing indices (from 1 to N) of
infectors for each case.
t_inf
: A list of length size
. Each item of the list is
an integer vector of length data$N
, storing dates of infections for
each case.
mu
: A numeric vector of length size
, storing values of
the mutation rate.
kappa
: A list of length size
. Each item of the list is
an integer vector of length data$N
, storing the number of generations
before the last sampled ancestor for each case.
pi
: A numeric vector of length size
, storing values of
the reporting probability.
eps
: A numeric vector of length size
, storing values of
the contact reporting coverage.
lambda
: A numeric vector of length size
, storing values of
the noninfectious contact rate.
counter
: A counter used to keep track of the current iteration
of the MCMC (used internally).
outbreaker_param
class content:
alpha
: An integer vector of length data$N
, storing
indices (from 1 to N) of infectors for each case.
t_inf
: An integer vector of length data$N
, storing dates
of infections for each case.
mu
: The value of the mutation rate.
kappa
: An integer vector of length data$N
, storing the
number of generations before the last sampled ancestor for each case.
pi
: The value of the reporting probability.
eps
: The value of the contact reporting coverage.
lambda
: The value of the noninfectious contact rate.
Thibaut Jombart ([email protected])
1 2 3 4 5 6 7 8 9  ## load data
x < fake_outbreak
data < outbreaker_data(dates = x$sample, dna = x$dna, w_dens = x$w)
## modify config settings
config < create_config(move_alpha = FALSE, n_iter = 2e5, sample_every = 1000)
## create param object
param < create_param(data = data, config = config)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.