Description Arguments Details Value
This function computes the estimated mean squared prediction errors from a given time series and prediction coefficients
X |
the data |
coef |
the array of coefficients. |
h |
which lead time to compute the MSPE for |
t |
a vector of times from which backward the forecasts are computed |
type |
indicating what type of measure of accuracy is to be computed; 1: mspe, 2: msae |
trimLo |
percentage of lower observations to be trimmed away |
trimUp |
percentage of upper observations to be trimmed away |
The array of prediction coefficients coef
is expected to be of
dimension P x P x H x length(N) x length(t)
and in the format as
it is returned by the function predCoef
. More precisely, for
p=1,…,P and the j.N
th element of N
element of
N
the coefficient of the
h
-step ahead predictor for X_{i+h} which is computed from
the observations X_i, …, X_{i-p+1} has to be available via
coef[p, 1:p, h, j.N, t==i]
.
Note that t
have to be the indices corresponding to the coefficients.
The resulting mean squared prediction error
\frac{1}{|\mathcal{T}|} ∑_{t \in \mathcal{T}} (X_{t+h} - (X_t, …, X_{t-p+1}) \hat v_{N[j.N],T}^{(p,h)}(t))^2
is then stored in the resulting matrix at position (p, j.N)
.
Returns a P x length(N)
matrix with the results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.