observation_process_logp: Calculates observation process log probability density

View source: R/probabilities.R

observation_process_logpR Documentation

Calculates observation process log probability density

Description

The probability of observations is a function of the number of cases remaining to be reported:

I_remaining = I_true - I_day_1

and the number of cases observed between day_1 and day_2:

I_obs = I_day_2 - I_day_1

It is given by:

binomial(I_obs|I_remaining, p_detect)

where p_detect is the probability a thus undetected case is detected between day_1 and day_2. This function calculates the combined probability of all observed cases pertaining to a particular onset date.

Usage

observation_process_logp(
  observation_df,
  cases_true,
  day_onset,
  reporting_parameters
)

Arguments

observation_df

a two-column data frame with columns 'time_reported' and 'cases_reported'

cases_true

true case count(s) originating on day_onset: can be a single value or vector

day_onset

day when case originates

reporting_parameters

named list of 'mean' and 'sd' of gamma distribution characterising the reporting delay distribution

Value

a log-probability or vector of log-probabilities


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