cross_validation | R Documentation |
Computes the cross-validation statistic of a moving-average on a time series
cross_validation(x, coef, ...)
x |
input time series. |
coef |
vector of coefficients or a moving-average ( |
... |
other arguments passed to the function |
The cross-validation statistics of a moving average (\theta_i)_{-p\leq i \leq p}
on a time series (y_i)_{1\leq i \leq n}
is:
\frac{1}{n-(p+q)}
\sum_{t=p+1}^{n-q}
\left(
\frac{y_t - \sum_{i=-p}^q \theta_i y_{t+i}}{
1-\theta_0
}
\right)^2.
The function cross_validation()
returns the time series (x_t)
) with
x_t = \frac{y_t - \sum_{i=-p}^q \theta_i y_{t+i}}{
1-\theta_0
}.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.