predict.shrinkTVP {shrinkTVP}R Documentation

Calculate predicted historical values for an estimated TVP model

Description

Calculates the predicted past values for an estimated TVP model, i.e. X_t'\beta_t + \epsilon_t. Note that in contrast to fitted.shrinkTVP this includes the error term.

Usage

## S3 method for class 'shrinkTVP'
predict(object, ...)

Arguments

object

a shrinkTVP object

...

Currently ignored.

Value

An object of class shrinkTVP_pred.

Author(s)

Peter Knaus peter.knaus@wu.ac.at

See Also

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

Examples



# Generate synthetic data
sim <- simTVP(N = 300)

# Estimate a model
res <- shrinkTVP(y ~ x1 + x2, sim$data)

# Calculate predicted values
pred <- predict(res)

# Visualize
plot(pred)
lines(sim$data$y, col = "forestgreen")


[Package shrinkTVP version 3.0.1 Index]