View source: R/shrinkTVP_methods.R
| residuals.shrinkTVP | R Documentation |
Calculates the residuals for an estimated TVP model, i.e. y_t - X_t'\beta_t.
## S3 method for class 'shrinkTVP'
residuals(object, ...)
object |
a |
... |
Currently ignored. |
An object of class shrinkTVP_resid
Peter Knaus peter.knaus@wu.ac.at
Other prediction functions:
LPDS(),
eval_pred_dens(),
fitted.shrinkTVP(),
forecast_shrinkTVP(),
predict.shrinkTVP()
# Generate synthetic data
sim <- simTVP(N = 300)
# Estimate a model
res <- shrinkTVP(y ~ x1 + x2, sim$data)
# Calculate residuals
resids <- residuals(res)
# Visualize
plot(resids)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.