generate_viable_start_pars: Function to generate random starting parameter values that...

View source: R/mcmc_help.R

generate_viable_start_parsR Documentation

Function to generate random starting parameter values that return a finite likelihood.

Description

This function is used to generate random starting values for the MCMC procedure.

Usage

generate_viable_start_pars(
  parTab,
  obs_dat,
  CREATE_POSTERIOR_FUNC,
  INCIDENCE_FUNC,
  PRIOR_FUNC,
  use_pos = FALSE,
  ...
)

Arguments

obs_dat

Tibble of observed data. Contains two columns, t for time of sample collection and ct for the Ct values.

CREATE_POSTERIOR_FUNC

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

INCIDENCE_FUNC

Function that expects a vector of named parameters and returns a vector of daily incidence.

PRIOR_FUNC

Function that returns the log prior probability for a given vector of parameter values given the prior means and sds.

use_pos

Boolean variable indicating if only positive Ct values i.e, those below a specified threshold, should be used. Set to FALSE by default.

partab

Tibble containing parameters corresponding to underlying incidence model (e.g. SEIR, SEEIRR).

Value

Dataframe containing random starting parameter values that return a finite likelihood.

Author(s)

James Hay, jhay@hsph.harvard.edu


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