state_process_logp: Determines the probability of a given number of cases given a...

View source: R/probabilities.R

state_process_logpR Documentation

Determines the probability of a given number of cases given a history of them

Description

If a Poisson renwal is being used, this calculates:

Pois(cases_true_t|Rt * \sum_tau=1^t_max w_t cases_true_t-tau)

or the following if a negative-binomial model is used:

NB(cases_true_t|Rt * \sum_tau=1^t_max w_t cases_true_t-tau, kappa)

Usage

state_process_logp(
  cases_true,
  cases_history,
  Rt,
  serial_parameters,
  kappa = NULL,
  is_negative_binomial = FALSE
)

Arguments

cases_true

true case count originating on day_onset

cases_history

a vector containing history of cases arranged from recent to past

Rt

effective reproduction number

serial_parameters

named list of 'mean' and 'sd' of gamma distribution characterising the serial interval distribution

kappa

overdispersion parameter

is_negative_binomial

if negative-binomial renewal model specified (defaults to FALSE)

Value

a log-probability or vector of log-probabilities


ben18785/incidenceinflation documentation built on Feb. 8, 2024, 2:36 a.m.