primiceri_draws_to_1d_forecast: Convert future MCMC draws from TVP a la Primiceri to interval...

Description Usage Arguments Details Value Examples

View source: R/forecast.R

Description

primiceri_draws_to_1d_forecast creates lower and upper interval borders, mean from future MCMC draws a la Primiceri for one specific variable.

Usage

1
2
primiceri_draws_to_1d_forecast(model, y_actual, series_no = 1, h = 1,
  level = c(80, 95))

Arguments

model

estimated TVP a la primiceri model

y_actual

original multivariate time series. One column is extracted and is stored in forecast object.

series_no

number of time series to predict

h

forecasting horizon

level

vector of confidence levels

Details

For every h future MCMC draws are obtained, than standard forecast object is created.

Value

one dimensional complex forecast object

Examples

1
2
3
4
5
6
data(rus_macro)
y_small <- rus_macro[, c("cpi", "employment", "m2")]
y_small_scaled <- scale_to(y_small)
primiceri_model <- estimate_tvp_primiceri(y_small_scaled, p = 1)
draws <- primiceri_draws_to_1d_forecast(primiceri_model, 
  y_actual = y_small_scaled, h = 1, series_no = 1)

bdemeshev/torro documentation built on May 21, 2019, 8:36 a.m.