Re-arrange the multi-step residuals
arrange_hres(list_res)
a list of \(H\) multi-step residuals. Each element of the list can be a vector (univariate time series) or a matrix (multivariate time series).
A vector or a matrix of multi-step residuals
Let \(Z_t\), \(t=1,\dots,T\), be a univariate time series. We can define the multi-step residuals such us \[\widehat{\varepsilon}_{h,t} = Z_{t+h} - \widehat{Z}_{t+h|t} \qquad h \le t \le T-h\] where \(\widehat{Z}_{t+h|t}\) is the \(h\)-step fitted value, calculated as the \(h\)-step ahead forecast given the time \(t\). Given the list of errors at different step (\([\widehat{\varepsilon}_{1,1}, \; \dots, \; \widehat{\varepsilon}_{1,T}]\), ..., \([\widehat{\varepsilon}_{H,1}, \; \dots, \; \widehat{\varepsilon}_{H,T}]\)) this function returns a \(T\)-vector with the residuals, organized in the following way: \[[\varepsilon_{1,1} \; \varepsilon_{2,2} \; \dots \; \varepsilon_{H,H} \; \varepsilon_{1,H+1} \; \dots \; \varepsilon_{H,T-H}]'\] Same idea can be apply for a multivariate time series.
Other utilities:
Cmatrix()
,
FoReco2ts()
,
agg_ts()
,
commat()
,
ctf_tools()
,
hts_tools()
,
lcmat()
,
oct_bounds()
,
residuals_matrix()
,
score_index()
,
shrink_estim()
,
thf_tools()