Learn R Programming

shrinkTVP (version 3.0.1)

fitted.shrinkTVP: 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 shrinkTVP
fitted(object, ...)

Value

An object of class shrinkTVP_fitted

Arguments

object

A shrinkTVP object

...

Currently ignored.

Author

Peter Knaus peter.knaus@wu.ac.at

See Also

Other prediction functions: LPDS(), eval_pred_dens(), forecast_shrinkTVP(), predict.shrinkTVP(), residuals.shrinkTVP()

Examples

Run this code
# \donttest{

# 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")
# }

Run the code above in your browser using DataLab