Description Usage Arguments Value Examples
The function MSPE computes the empirical mean squared prediction
errors for a collection of h-step ahead, linear predictors
(h=1,…,H) of observations X_{t+h}, where
m_1 ≤q t+h ≤q m_2, for two indices m_1 and m_2.
The resulting array provides
\frac{1}{m_{\rm lo} - m_{\rm up} + 1} ∑_{t=m_{\rm lo}}^{m_{\rm up}} R_{(t)}^2,
with R_{(t)} being the prediction errors
R_t := | X_{t+h} - (X_t, …, X_{t-p+1}) \hat v_{N,T}^{(p,h)}(t) |,
ordered by magnitude; i.e., they are such that R_{(t)} ≤q R_{(t+1)}.
The lower and upper limits of the indices are
m_{\rm lo} := m_1-h + \lfloor (m_2-m_1+1) α_1 \rfloor and
m_{\rm up} := m_2-h - \lfloor (m_2-m_1+1) α_2 \rfloor.
The function MAPE computes the empirical mean absolute prediction
errors
\frac{1}{m_{\rm lo} - m_{\rm up} + 1} ∑_{t=m_{\rm lo}}^{m_{\rm up}} R_{(t)},
with m_{\rm lo}, m_{\rm up} and R_{(t)} defined as before.
1 2 3 4 5 |
X |
the data X_1, …, X_T |
predcoef |
the prediction coefficients in form of a list of an array
|
m1 |
first index from the set in which the indices t+h shall lie |
m2 |
last index from the set in which the indices t+h shall lie |
P |
maximum order of prediction coefficients to be used;
must not be larger than |
H |
maximum lead time to be used;
must not be larger than |
N |
vector with the segment sizes to be used, 0 corresponds to using 1, ..., t; has to be a subset of predcoef$N. |
trimLo |
percentage α_1 of lower observations to be trimmed away |
trimUp |
percentage α_2 of upper observations to be trimmed away |
MSPE returns an object of type MSPE that has mspe,
an array of size H\timesP\timeslength(N),
as an attribute, as well as the parameters N, m1,
m2, P, and H.
MAPE analogously returns an object of type MAPE that
has mape and the same parameters as attributes.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.