wcore_summary_best | R Documentation |
wcore_summary_best
chooses the wavelet models that are the most
favorable ones in terms of statistics calculated by the function
wcore_summary_fcast
.
wcore_summary_best(x, d = c(1, 1, 1, 1, 1))
x |
A tibble from |
d |
A vector of weigths. These weigths stand for standard deviation, moving avarage, no bias, dynamic adjustment and forecast error, respectively. |
Criteria variables that are in input x
are normalized to the interval [0, 1]. Given d
,
the function wcore_summary_best
returns the model in which the sum
of criteria is minimal. When the criterion is p-value, as in
no bias, the normalization is (1 - "p-value").
The motivation for this function is that a good core inflation
should possess desirable statistical features. Some of them are
captured in wcore_summary_best
. A good core inflation
should have low standard deviation, capture trend inflation
(moving avarage), not be biased, have dynamic consistency, and should help to predict headline
inflation.
A tibble with the best models. If more than one wavelet specification have the same statistics, all these models are presented in the tibble.
Silva Filho, Tito N. Teixeira da, & Figueiredo, Francisco Marcos Rodrigues. (2011). Has core inflation been doing a good job in Brazil?. Revista Brasileira de Economia, 65(2), 207-233.
Yash P. Mehra & Devin Reilly, 2009. "Short-term headline-core inflation dynamics," Economic Quarterly, Federal Reserve Bank of Richmond, issue Sum, pages 289-313.
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)
wavcore_smry <- wcore_summary_fcast(inf_head, core_wavelet2, err_wcore)
wcore_summary_best(wavcore_smry)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.