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

View source: R/create_posterior_func.R

create_post_func_seeirr_combinedR Documentation

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

Description

Creates a new function which calculates the posterior probability of a set of parameter values conditional on the Ct data using the combined SEEIRR model. This model uses multiple cross-sectional samples.

Usage

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

Arguments

data

A tibble containing four columns: date for the sample collection date, POS for the number of individuals who test positive, NEG for the number of individuals who test negative, and location for location of sample collection.

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.

Details

#' @param parTab A vector of model parameters with names corresponding to the parameter control table.

Value

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

Author(s)

James Hay, jhay@hsph.harvard.edu

See Also

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


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