hierarchical_bayesian_model {serosv}R Documentation

Hierarchical Bayesian Model

Description

Refers to section 10.3

Usage

hierarchical_bayesian_model(
  data,
  type = "far3",
  chains = 1,
  warmup = 1500,
  iter = 5000
)

Arguments

data

the input data frame, must either have 'age', 'pos', 'tot' columns (for aggregated data) OR 'age', 'status' for (linelisting data)

type

type of model ("far2", "far3" or "log_logistic")

chains

number of Markov chains

warmup

number of warmup runs

iter

number of iterations

Value

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

Examples


df <- mumps_uk_1986_1987
model <- hierarchical_bayesian_model(df, type="far3")
model$info
plot(model)


[Package serosv version 1.1.0 Index]