This function computes the localised and iterated Yule-Walker coefficients
for h-step ahead forecasting of Xt+h from Xt,...,Xt−p+1,
where h=1,…,H and p=1,…,P.
Arguments
X
the data X1,…,XT
P
the maximum order of coefficients to be computed; has to be a positive integer
H
the maximum lead time; has to be a positive integer
t
a vector of values t; the elements have to satisfy
max(t) <= length(X) and min(t) >= min(max(N[N != 0]),p).
N
a vector of values N; the elements have to satisfy
max(N[N != 0]) <= min(t) and min(N[N != 0]) >= 1 + P.
N=0 corresponds to the case where all data is taken into account.
Details
For every t∈t and every N∈N the (iterated) Yule-Walker
estimates v^N,T(p,h)(t) are computed. They are defined as
is the usual lag-k autocovariance estimator (without mean adjustment),
computed from the observations Xt−N+1,…,Xt.
The Durbin-Levinson Algorithm is used to successively compute the solutions to the
Yule-Walker equations (cf. Brockwell/Davis (1991), Proposition 5.2.1).
To compute the h-step ahead coefficients we use the recursive relationship
Returns a named list with elements coef, t, and N,
where coef is an array of dimension
P×P×H×length(t)×length(N), and
t, and N are the parameters provided on the call of the
function. See the example on how to access the vector
v^N,T(p,h)(t).
References
Brockwell, P. J. & Davis, R. A. (1991).
Time Series: Theory and Methods. Springer, New York.
Examples
T <- 100
X <- rnorm(T)
P <- 5
H <- 1
m <- 20
Nmin <- 25
pcoef <- predCoef(X, P, H, (T - m - H + 1):T, c(0, seq(Nmin, T - m - H, 1)))
## Access the prediction vector for p = 2, h = 1, t = 95, N = 25
p <- 2
h <- 1
t <- 95
N <- 35
res <- pcoef$coef[p, 1:p, h, pcoef$t == t, pcoef$N == N]