| simulate.qpm_solution | R Documentation |
Draws Gaussian shocks with the model's standard deviations and iterates
the solved transition. Returns variables in levels (steady state plus
simulated deviations). The final full state is stored as an attribute
so a simulation can be handed straight to qpm_forecast().
## S3 method for class 'qpm_solution'
simulate(object, nsim = 40, seed = NULL, sigma = NULL, burn = 0, ...)
object |
A |
nsim |
Number of quarters to simulate. |
seed |
Optional seed for reproducibility. The previous RNG state is restored on exit. |
sigma |
Optional named vector of shock standard deviations overriding the model's. |
burn |
Burn-in quarters discarded from the start. |
... |
Unused. |
A data frame of class qpm_sim (period plus one column per
declared variable), with attributes state (final expanded state,
deviations) and shocks (the drawn shocks).
sol <- qpm_solve(qpm_template("bkl"))
hist <- simulate(sol, nsim = 60, seed = 42, burn = 20)
head(hist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.