JAGSmodel: Return the appropriate JAGS model to use

Description Usage Arguments Value

View source: R/models.R

Description

This function formats and returns the appropriate JAGS model according to the details of the estimation desired, i.e. whether the infection times or symptom times are used, whether a delay adjustment is desired, whether missing values exist in the symptom onset dates vector, and whether we work only with symptom onset dates and not diagnosis dates.

Usage

1
2
3
4
5
6
JAGSmodel(
  withInfectTimes = TRUE,
  delayAdjust = TRUE,
  withMissing = TRUE,
  single = FALSE
)

Arguments

withInfectTimes

Use extrapolated infection times for estimating R.

delayAdjust

Make a delay adjustment, based on the distribution of times from symptom onset to diagnosis, or infection to diagnosis.

withMissing

Does the symptom onset dates vector contain missing values? If so, dates of diagnosis should also be supplied.

single

Do we work only with symptom onset dates? (No diagnosis dates). If TRUE, then arguments delayAdjust and withMissing are ignored (no delay adjustment possible and no missing symptom onset dates allowed).

Value

An character vector of length 1, containing the JAGS model to use


thlytras/bayEStim documentation built on Aug. 8, 2020, 9:32 p.m.