View source: R/create_posterior_func.R
create_post_func_seeirr | R Documentation |
Creates a new function which calculates the posterior probability of a set of parameter values conditional on the Ct data using an SEEIRR model.
create_post_func_seeirr(
parTab,
data,
ts,
INCIDENCE_FUNC = detectable_SEEIRRModel,
PRIOR_FUNC = NULL,
ver = "likelihood"
)
parTab |
A vector of model parameters with names corresponding to the parameter control table. |
data |
A tibble containing three columns: date for the sample collection date, POS for the number of individuals who test positive, and NEG for the number of individuals who test negative. |
ts |
The times over which the SEEIRR model is solved. Used to subset the modeled prevalence by the sample collection dates. |
INCIDENCE_FUNC |
A function that returns a vector of daily infection probabilities/ incidence. Set to 'detectable_SEEIRRModel' by default. |
PRIOR_FUNC |
A function for the prior distribution. NULL by default. |
ver |
Can be set to 'model' or 'likelihood.' 'model' returns the prevalence from the SEEIRR model rather than the posterior probability. Set to 'likelihood' by default. |
Returns a single log posterior probability or the prevalence from the SEEIRR model.
James Hay, jhay@hsph.harvard.edu
Other create posterior functions:
create_post_func_seeirr_combined()
,
create_posterior_func_detectable()
,
create_posterior_func()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.