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

View source: R/create_posterior_func.R

create_posterior_func_detectableR Documentation

Creates the posterior function used in the MCMC framework for detectable Ct values

Description

Creates a new function which calculates the posterior probability of a set of parameter values conditional on data that include only individuals with detectable PCR values on the sample collection day.

Usage

create_posterior_func_detectable(
  parTab,
  data,
  PRIOR_FUNC = NULL,
  INCIDENCE_FUNC = NULL,
  solve_likelihood = TRUE,
  ...
)

Arguments

parTab

A vector of model parameters with names corresponding to the parameter control table.

data

A tibble containing two columns: t for sample time and ct for the Ct values.

PRIOR_FUNC

A function for the prior distribution. NULL by default.

INCIDENCE_FUNC

A function that returns a vector of daily infection probabilities/ incidence. NULL by default.

solve_likelihood

Solves the likelihood. TRUE by default.

Value

Returns a single log posterior probability.

Author(s)

James Hay, jhay@hsph.harvard.edu

See Also

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


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