arrange_hres: Re-arrange the multi-step residuals

View source: R/residualsfun.R

arrange_hresR Documentation

Re-arrange the multi-step residuals

Description

Re-arrange the multi-step residuals

Usage

arrange_hres(list_res)

Arguments

list_res

a list of \mjseqnH multi-step residuals. Each element of the list can be a vector (univariate time series) or a matrix (multivariate time series).

Details

Let \mjseqnZ_t, \mjseqnt=1,...,T, be a univariate time series. We can define the multi-step residuals such us \mjsdeqn\widehat\varepsilon_h,t = Z_t+h - \widehatZ_t+h|t \qquad h \le t \le T-h where \mjseqn\widehatZ_t+h|t is the \mjseqnh-step fitted value, calculated as the \mjseqnh-step ahead forecast given the time \mjseqnt. Given the list of errors at different step (\mjseqn[\widehat\varepsilon_1,1, \; ..., \; \widehat\varepsilon_1,T], ..., \mjseqn[\widehat\varepsilon_H,1, \; ..., \; \widehat\varepsilon_H,T]) this function returns a \mjseqnT-vector with the residuals, organized in the following way: \mjsdeqn[\varepsilon_1,1 \; \varepsilon_2,2 \; ... \; \varepsilon_H,H \; \varepsilon_1,H+1 \; ... \; \varepsilon_H,T-H]' Same idea can be apply for a multivariate time series.

Value

A vector or a matrix of multi-step residuals

See Also

Other utilities: Cmatrix(), FoReco2ts(), agg_ts(), commat(), ctf_tools(), hts_tools(), lcmat(), oct_bounds(), residuals_matrix(), score_index(), shrink_estim(), thf_tools()


FoReco documentation built on May 31, 2023, 5:17 p.m.