acfARp {forecastSNSTS} | R Documentation |
Compute autocovariances of an AR(p) process
Description
This functions returns the autocovariances of a
stationary time series
that fulfills the following equation:
where ,
is white noise and
are real numbers satisfying that the roots
of the polynomial
lie strictly outside the unit circle.
Usage
acfARp(a = NULL, sigma, k)
Arguments
a |
vector |
sigma |
standard deviation of |
k |
lag for which to compute the autocovariances. |
Value
Returns autocovariance at lag k of the AR(p) process.
Examples
## 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)
[Package forecastSNSTS version 1.3-0 Index]