View source: R/shrinkTVP_methods.R
fitted.shrinkTVP | R Documentation |
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.
## S3 method for class 'shrinkTVP'
fitted(object, ...)
object |
A |
... |
Currently ignored. |
An object of class shrinkTVP_fitted
Peter Knaus peter.knaus@wu.ac.at
Other prediction functions:
LPDS()
,
eval_pred_dens()
,
forecast_shrinkTVP()
,
predict.shrinkTVP()
,
residuals.shrinkTVP()
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.