Draws parameters from their priors and simulates the latent process, infections and observations.
# S3 method for class 'julia_spec'
simulate(object, nsim = 1, seed = NULL, n, ...)A named list of nsim x n matrices: generated_y_t (simulated
observations), expected_y_t, I_t, Z_t and, for renewal models built
with Renewal(), Rt. A model written as julia() code gets no Rt,
since its latent scale is not known to R. Time points without an
observation (e.g. before a reporting delay has elapsed) are NaN.
Other inference:
fit(),
nuts(),
plot.cidm_fit(),
predict.cidm_fit(),
summary.cidm_fit()
if (FALSE) { # \dontrun{
model <- IDModel(
DirectInfections(Z = RandomWalk(), initialisation = Normal(log(100), 1)),
PoissonError()
)
sims <- simulate(model, nsim = 10, n = 30, seed = 42)
matplot(t(sims$generated_y_t), type = "l")
} # }