View source: R/prediction-tools.R
| prediction_interval | R Documentation |
Computes point predictions and prediction intervals using the one-step-ahead innovation variance from the Kalman filter.
prediction_interval(object, level = 0.95, ...)
object |
A |
level |
Confidence level for prediction intervals (default 0.95). |
... |
Additional arguments passed to |
An object of class "dsge_prediction_interval" with
components fit, lower, upper, se,
level, and variables.
m <- dsge_model(
obs(y ~ z),
state(z ~ rho * z),
start = list(rho = 0.5)
)
set.seed(1)
z <- numeric(100); for (i in 2:100) z[i] <- 0.8 * z[i-1] + rnorm(1)
fit <- estimate(m, data = data.frame(y = z))
pi <- prediction_interval(fit, level = 0.95)
print(pi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.