wcore_summary_fcast: Includes Forecasting in the Wavelet Core Inflation Summary

View source: R/summary.R

wcore_summary_fcastR Documentation

Includes Forecasting in the Wavelet Core Inflation Summary

Description

wcore_summary_fcast includes forecasting error in the summary of the wavelet core inflation measure. This is done separetely because forecasting can be too consuming in terms of computation time.

Usage

wcore_summary_fcast(y, wcoretbl, error)

Arguments

y

A numeric vector (headline inflation) that must be the same x used in wav_smooth.

wcoretbl

An object generated by the function wcore_table.

error

An object generated by the function error_wave_summary.

Value

A tibble. New columns are added to the object wcoretbl:

error

Mean of RMSE for several horizons. See error_wave_summary.

sd, mav25, no_bias, alpha, val_p, alpha1, val_p1

These columns are the same ones explained in the section Value of the wcore_summary function.

Examples

library(lubridate)

wshr_obj <- wav_args_wshr(list(
wavelet = c("haar", "d4", "d6", "d8", "s8"),
n.level = 1:4
))

inf_head <- coreinf_br[["ipca"]]

date_start <- coreinf_br[["date"]][1]
ts_start <- c(year(date_start), month(date_start))
inf_head_ts <- ts(inf_head, start = ts_start, frequency = 12)

core_wavelet <- wav_smooth(inf_head, wshr_obj)
core_wavelet2 <- wcore_table(core_wavelet, inf_head_ts)

# A more realistic estimation of the forecasting
# error could have h and k greather than 2 and 6.

err_wcore <- error_wave_summary(h = 2, x = wshr_obj,
                                y = inf_head, lags = lags(2,1),
                                k = 6, RMSE = TRUE)

wcore_summary_fcast(inf_head, core_wavelet2, err_wcore)


nelson16silva/wavcoreinf documentation built on Feb. 17, 2025, 7:10 p.m.