Description Usage Arguments Value Examples
This functions returns the autocovariances Cov(X_{t-k}, X_t) of a stationary time series (Y_t) that fulfills the following equation:
Y_t = ∑_{j=1}^p a_j Y_{t-j} + σ \varepsilon_{t},
where σ > 0, \varepsilon_t is white noise and a_1, …, a_p are real numbers satisfying that the roots z_0 of the polynomial 1 - ∑_{j=1}^p a_j z^j lie strictly outside the unit circle.
1 |
a |
vector (a_1, …, a_p) of coefficients; default NULL, corresponding to p = 0, white noise with variance σ^2, |
sigma |
standard deviation of \varepsilon_t; default 1, |
k |
lag for which to compute the autocovariances. |
Returns autocovariance at lag k of the AR(p) process.
1 2 3 4 5 6 7 8 9 | ## Taken from Section 6 in Dahlhaus (1997, AoS)
a1 <- function(u) {1.8 * cos(1.5 - cos(4*pi*u))}
a2 <- function(u) {-0.81}
# local autocovariance for u === 1/2: lag 1
acfARp(a = c(a1(1/2), a2(1/2)), sigma = 1, k = 1)
# local autocovariance for u === 1/2: lag -2
acfARp(a = c(a1(1/2), a2(1/2)), sigma = 1, k = -1)
# local autocovariance for u === 1/2: the variance
acfARp(a = c(a1(1/2), a2(1/2)), sigma = 1, k = 0)
|
[1] 10.64784
[1] 10.64784
[1] 12.20055
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.