Models linking expected observations to data. Error models (PoissonError(), NegativeBinomialError(), NormalError()) define the likelihood; modifiers (LatentDelay(), Ascertainment()) wrap another observation model to transform the expected observations first. Each wraps the constructor of the same name in ComposableTuringIDModels.jl. NULL arguments use the Julia default, and delta_d is the discretisation width Julia spells with a Greek delta.

PoissonError()

NegativeBinomialError(cluster_factor = NULL)

NormalError(std = NULL)

LatentDelay(model, delay, D = NULL, delta_d = NULL)

Ascertainment(model, latent_model)

Arguments

cluster_factor

Prior for the negative binomial cluster factor, \(\sqrt{1/\phi}\), which is approximately the coefficient of variation of the observation noise.

std

Prior for the standard deviation of normal observation error.

model

The observation model to wrap.

delay

The delay from infection to observation: a continuous distribution (discretised in Julia with double interval censoring), a numeric probability vector whose first entry is a delay of zero, or a NonParametric() or Fixed() distribution, which is discretised in R. Uncertain parameters give an inferred delay.

D

Numeric. Maximum delay used when discretising a distribution, taken from the distribution's max when it has one.

delta_d

Numeric. Discretisation interval width.

latent_model

Ascertainment on the log scale: a distribution for a constant ascertainment or a latent model for a time-varying one.

Value

An object of class julia_observation.

See also

Examples

# Negative binomial reporting of infections after an incubation period
LatentDelay(
  NegativeBinomialError(cluster_factor = HalfNormal(0.1)),
  delay = LogNormal(1.6, 0.42)
)
#> <julia observation spec>
#> LatentDelay(
#>     NegativeBinomialError(; cluster_factor = HalfNormal(0.1)),
#>     LogNormal(1.6, 0.42)
#> )

# Poisson reporting of 10% of infections
Ascertainment(PoissonError(), latent_model = FixedIntercept(log(0.1)))
#> <julia observation spec>
#> Ascertainment(PoissonError(), FixedIntercept(-2.3025850929940455))