Learn R Programming

irregulAR1 (version 1.0.0)

chol_tridiag_upper: Upper Cholesky decomposition of a tridiagonal matrix.

Description

Creates the lower Cholesky decomposition of a tridiagonal matrix. The decomposition will be a sparse lower triangular matrix with non-zero elements only on the main diagonal and the diagonal below it.

Usage

chol_tridiag_upper(Q)

Arguments

Q

A square tridiagonal matrix.

Value

A sparse square matrix with the same size as the input matrix.

Examples

Run this code
# NOT RUN {
library(Matrix)
times <- c(1, 4:5, 7)
rho <- 0.5
sigma <- 1
Q <- ar1_prec_irregular(times, rho, sigma)
chol_tridiag_upper(Q)
# }

Run the code above in your browser using DataLab