View source: R/hierarchical_bayesian_model.R
hierarchical_bayesian_model | R Documentation |
Refers to section 10.3
hierarchical_bayesian_model(
age,
pos = NULL,
tot = NULL,
status = NULL,
type = "far3",
chains = 1,
warmup = 1500,
iter = 5000
)
age |
the age vector |
pos |
the positive count vector (optional if status is provided). |
tot |
the total count vector (optional if status is provided). |
status |
the serostatus vector (optional if pos & tot are provided). |
type |
type of model ("far2", "far3" or "log_logistic") |
chains |
number of Markov chains |
warmup |
number of warmup runs |
iter |
number of iterations |
a list of class hierarchical_bayesian_model with 6 items
datatype |
type of datatype used for model fitting (aggregated or linelisting) |
df |
the dataframe used for fitting the model |
type |
type of bayesian model far2, far3 or log_logistic |
info |
parameters for the fitted model |
sp |
seroprevalence |
foi |
force of infection |
df <- mumps_uk_1986_1987
model <- hierarchical_bayesian_model(age = df$age, pos = df$pos, tot = df$tot, type="far3")
model$info
plot(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.