wcore_best_median | R Documentation |
wcore_best_median
extracts the series of the best model
computed by the function wcore_summary_best
. If more than
one model is selected, this function calculates the median of the models.
wcore_best_median(x)
x |
An object from |
A tibble.
wcore_summary_best
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)
x <- wcore_summary_best(wavcore_smry)
wcore_best_median(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.