| fitted.shrinkTVP {shrinkTVP} | R Documentation |
Calculate fitted historical values for an estimated TVP model
Description
Calculates the fitted values for an estimated TVP model, i.e. X_t'\beta_t.
Note that in contrast to predict.shrinkTVP this does not include the error term.
Usage
## S3 method for class 'shrinkTVP'
fitted(object, ...)
Arguments
object |
A |
... |
Currently ignored. |
Value
An object of class shrinkTVP_fitted
Author(s)
Peter Knaus peter.knaus@wu.ac.at
See Also
Other prediction functions:
LPDS(),
eval_pred_dens(),
forecast_shrinkTVP(),
predict.shrinkTVP(),
residuals.shrinkTVP()
Examples
# Generate synthetic data
sim <- simTVP()
# Estimate a model
res <- shrinkTVP(y ~ x1 + x2, sim$data)
# Calculate fitted values
fitted <- fitted(res)
# Visualize
plot(fitted)
lines(sim$data$y, col = "forestgreen")
[Package shrinkTVP version 3.0.1 Index]