Joins an infection model, which carries its own latent process, to an observation model. The result can be simulated from with simulate() and fitted to data with fit().

IDModel(infection, observation)

Arguments

infection

An infection model, e.g. from Renewal().

observation

An observation model, e.g. from NegativeBinomialError().

Value

An object of class julia_model.

Examples

model <- IDModel(
  infection = Renewal(
    generation_time = Gamma(shape = 6.5, scale = 0.62),
    rt = AR(),
    initialisation = Normal(log(1), 0.1)
  ),
  observation = NegativeBinomialError(cluster_factor = HalfNormal(0.1))
)
model
#> <julia model spec>
#> IDModel(
#>     Renewal(;
#>         generation_time = Gamma(6.5, 0.62),
#>         rt = AR(),
#>         initialisation = Normal(0.0, 0.1)
#>     ),
#>     NegativeBinomialError(; cluster_factor = HalfNormal(0.1))
#> )

# The Julia code this model runs
cat(as_julia(model))
#> IDModel(Renewal(; generation_time = Gamma(6.5, 0.62), rt = AR(), initialisation = Normal(0.0, 0.1)), NegativeBinomialError(; cluster_factor = HalfNormal(0.1)))