View source: R/prediction-tools.R
| prediction_accuracy | R Documentation |
Computes root mean squared error (RMSE), mean absolute error (MAE), and mean error (bias) of one-step-ahead predictions.
prediction_accuracy(object, ...)
object |
A |
... |
Additional arguments (currently unused). |
An object of class "dsge_prediction_accuracy" containing:
Named numeric vector of RMSE by variable.
Named numeric vector of MAE by variable.
Named numeric vector of mean error by variable.
Number of observations.
Variable names.
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))
acc <- prediction_accuracy(fit)
print(acc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.