fitted.shrinkTVP: Calculate fitted historical values for an estimated TVP model

View source: R/shrinkTVP_methods.R

fitted.shrinkTVPR 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 shrinkTVP object

...

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


shrinkTVP documentation built on Nov. 23, 2023, 1:12 a.m.