Cholesky | R Documentation |
Multiplies the Cholesky decomposition of the Toeplitz matrix with another matrix, or solves a system of equations with the Cholesky factor.
cholZX(Z, acf) cholXZ(X, acf)
Z |
Length- |
acf |
Length- |
X |
Length- |
If C == t(chol(toeplitz(acf)))
, then cholZX()
computes C %*% Z
and cholZX()
computes solve(C, X)
. Both functions use the Durbin-Levinson algorithm.
Size N x p
residual or observation matrix.
N <- 10 p <- 2 acf <- exp(-(1:N - 1)) Z <- matrix(rnorm(N * p), N, p) cholZX(Z = Z, acf = acf) - (t(chol(toeplitz(acf))) %*% Z) X <- matrix(rnorm(N * p), N, p) cholXZ(X = X, acf = acf) - solve(t(chol(toeplitz(acf))), X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.