Models for the latent paths that drive infection models, such as the log
reproduction number in Renewal(). Each wraps the constructor of the same
name in ComposableTuringIDModels.jl; see its
documentation for
the full model definitions. NULL arguments use the Julia default.
AR(damp = NULL, init = NULL, epsilon_t = NULL)
MA(theta = NULL, epsilon_t = NULL)
RandomWalk(init = NULL, epsilon_t = NULL)
IID(dist = Normal(0, 1))
Intercept(dist)
FixedIntercept(value)
HierarchicalNormal(mean = NULL, std = NULL)
DiffLatentModel(model, init = NULL)Prior for the damping coefficients: a distribution, a list of
distributions (one per lag) or, for order one, a latent model for a
time-varying coefficient. The two are on different scales: a distribution
is a prior on the coefficient itself, while a latent model is squashed
through tanh to keep the process stationary.
Prior for the initial values: a distribution or a list of distributions (one per lag or difference).
Model for the innovations, typically a
HierarchicalNormal().
Prior for the moving-average coefficients, as for damp.
A distribution.
Numeric. The fixed value.
Numeric. Mean of the process.
Prior for the standard deviation.
A latent model for the differenced process.
An object of class julia_latent.
Arguments that Julia spells with a Greek letter are spelled out here:
epsilon_t is its innovation slot and theta its moving-average
coefficients.
AR(): autoregressive process whose order is the number of damping
priors.
MA(): moving-average process whose order is the number of coefficient
priors.
RandomWalk(): random walk.
IID(): independent draws from a distribution.
Intercept(): a single draw repeated over time.
FixedIntercept(): a fixed value repeated over time.
HierarchicalNormal(): non-centred normal draws with an inferred standard
deviation, the default innovation model.
DiffLatentModel(): a process whose differences follow model, giving
e.g. ARIMA-style processes when model is an AR().
Other components:
IDModel(),
distributions,
infection-models,
observation-models
# AR(2) on log Rt, as in Mishra et al. (2020)
AR(
damp = list(truncated(Normal(0.8, 0.05), 0, 1),
truncated(Normal(0.1, 0.05), 0, 1)),
init = list(Normal(0, 0.2), Normal(0, 0.2)),
epsilon_t = HierarchicalNormal(std = HalfNormal(0.1))
)
#> <julia latent spec>
#> AR(;
#> damp = [
#> truncated(Normal(0.8, 0.05), 0.0, 1.0),
#> truncated(Normal(0.1, 0.05), 0.0, 1.0)
#> ],
#> init = [Normal(0.0, 0.2), Normal(0.0, 0.2)],
#> ϵ_t = HierarchicalNormal(; std = HalfNormal(0.1))
#> )
RandomWalk(init = Normal(0, 0.25))
#> <julia latent spec>
#> RandomWalk(; init = Normal(0.0, 0.25))