Learn R Programming

SuperGauss (version 1.0.2)

Choleski: Choleski multiplication with Toeplitz variance matrices.

Description

Multiplies the Choleski decomposition of the Toeplitz matrix with another matrix, or solves a system of equations with the Cholesky factor.

Usage

cholZX(Z, acf)

cholXZ(X, acf)

Arguments

Z

Length-N or N x p matrix of residuals.

acf

Length-N autocorrelation vector of the Toeplitz variance matrix.

X

Length-N or N x p matrix of observations.

Value

Size N x p residual or observation matrix.

Details

If C == t(chol(toeplitz(acf))), then cholZX computes C %*% Z and cholZX computes solve(C, X). Both functions use the Durbin-Levinson algorithm.

Examples

Run this code
# NOT RUN {
N <- 10
p <- 2
W <- matrix(rnorm(N * p), N, p)
acf <- exp(-(1:N - 1))
cholZX(Z = W, acf = acf)
cholXZ(X = W, acf = acf)
# }

Run the code above in your browser using DataLab