create_post_func_seeirr: Creates the posterior function used in the MCMC framework for...

View source: R/create_posterior_func.R

create_post_func_seeirrR Documentation

Creates the posterior function used in the MCMC framework for the SEEIRR model

Description

Creates a new function which calculates the posterior probability of a set of parameter values conditional on the Ct data using an SEEIRR model.

Usage

create_post_func_seeirr(
  parTab,
  data,
  ts,
  INCIDENCE_FUNC = detectable_SEEIRRModel,
  PRIOR_FUNC = NULL,
  ver = "likelihood"
)

Arguments

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.

Value

Returns a single log posterior probability or the prevalence from the SEEIRR model.

Author(s)

James Hay, jhay@hsph.harvard.edu

See Also

Other create posterior functions: create_post_func_seeirr_combined(), create_posterior_func_detectable(), create_posterior_func()


jameshay218/virosolver documentation built on April 17, 2025, 2:57 p.m.