View source: R/pac-equations.R
| pac_simulate | R Documentation |
Simulates y_t = \sum_k a_k y_{t-k} + \sum_j c w_j E_t y^*_{t+j}
given a deterministic path for the target under perfect foresight
(the target path is known at t = 1). Values of the target
beyond the end of the supplied path are held at its final value, so a
path that ends at a constant is treated as settling there permanently.
pac_simulate(pac, ystar, y_init = NULL)
pac |
A |
ystar |
Numeric vector giving the target path. |
y_init |
Optional numeric vector of |
A numeric vector of the simulated y path, the same
length as ystar.
pac_weights
pac <- pac_weights(beta = 0.99, d = 3)
# Permanent unit step in the target
y <- pac_simulate(pac, ystar = c(rep(0, 5), rep(1, 60)))
round(head(y, 12), 3)
# Adjustment is gradual but eventually complete
round(tail(y, 1), 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.