Internal Documentation

Documentation for EpiObsModels.jl's internal interface.

Contents

Index

Internal API

EpiAware.EpiObsModels.LDStepType
struct LDStep{D<:(AbstractVector{<:Real})} <: AbstractAccumulationStep

The LatentDelay step function struct


Fields

  • rev_pmf::AbstractVector{<:Real}
source
EpiAware.EpiAwareBase.generate_observationsMethod
generate_observations(
    obs_model::AbstractTuringObservationErrorModel,
    y_t,
    Y_t
) -> Any

Generates observations from an observation error model. It provides support for missing values in observations (y_t), and expected observations (Y_t) that are shorter than observations. When this is the case it assumes that the expected observations are the last length(Y_t) elements of y_t. It also pads the expected observations with a small value (1e-6) to mitigate potential numerical issues.

It dispatches to the observation_error function to generate the observation error distribution which uses priors generated by generate_observation_error_priors submodel. For most observation error models specific implementations of observation_error and generate_observation_error_priors are required but a specific implementation of generate_observations is not required.

source
EpiAware.EpiAwareBase.generate_observationsMethod
generate_observations(
    obs_model::Ascertainment,
    y_t,
    Y_t
) -> Any

Generates observations based on the LatentDelay observation model.

Arguments

  • obs_model::Ascertainment: The Ascertainment model.
  • y_t: The current state of the observations.
  • Y_t` : The expected observations.

Returns

  • y_t: The updated observations.
  • expected_aux: Additional expected observation-related variables.
  • obs_aux: Additional observation-related variables.
source
EpiAware.EpiAwareBase.generate_observationsMethod
generate_observations(
    obs_model::LatentDelay,
    y_t,
    Y_t
) -> Any

Generates observations based on the LatentDelay observation model.

Arguments

  • obs_model::LatentDelay: The LatentDelay observation model.
  • y_t: The current observations.
  • I_t: The current infection indicator.

Returns

  • y_t: The updated observations.
source
EpiAware.EpiAwareBase.generate_observationsMethod
generate_observations(
    obs_model::StackObservationModels,
    y_t::NamedTuple,
    Y_t::AbstractVector
) -> Any

Generate observations from a stack of observation models. Maps Y_t to a NamedTuple of the same length as y_t assuming a 1 to many mapping.

Arguments

  • obs_model::StackObservationModels: The stack of observation models.
  • y_t::NamedTuple: The observed values.
  • Y_t::AbstractVector: The expected values.
source
EpiAware.EpiAwareBase.generate_observationsMethod
generate_observations(
    obs_model::StackObservationModels,
    y_t::NamedTuple,
    Y_t::NamedTuple
) -> Any

Generate observations from a stack of observation models. Assumes a 1 to 1 mapping between y_t and Y_t.

Arguments

  • obs_model::StackObservationModels: The stack of observation models.
  • y_t::NamedTuple: The observed values.
  • Y_t::NamedTuple: The expected values.
source
EpiAware.EpiObsModels.NegativeBinomialMeanClustMethod
NegativeBinomialMeanClust(μ, α) -> SafeNegativeBinomial

Compute the mean-cluster factor negative binomial distribution.

Arguments

  • μ: The mean of the distribution.
  • α: The clustering factor parameter.

Returns

A NegativeBinomial distribution object.

source
EpiAware.EpiObsModels.generate_observation_kernelMethod
generate_observation_kernel(
    delay_int,
    time_horizon;
    partial
) -> Any

Generate an observation kernel matrix based on the given delay interval and time horizon.

Arguments

  • delay_int::Vector{Float64}: The delay PMF vector.
  • time_horizon::Int: The number of time steps of the observation period.
  • partial::Bool: Whether to generate a partial observation kernel matrix.

Returns

  • K::SparseMatrixCSC{Float64, Int}: The observation kernel matrix.
source