CALL CHOL Routine

Calculates the Cholesky decomposition for a given symmetric matrix.
Category: Matrix Operations
Alias: CHOLESKY_DECOMP
Requirement: Both input and output matrices must be square and have the same dimensions. X must be symmetric positive-definite, and Y will be a lower triangle matrix.

Syntax

CALL CHOL(X, Y <, validate>);

Required Arguments

X
specifies a symmetric positive-definite input matrix with dimensions m x m (that is, X[m, m]).
Y
specifies an output matrix with dimensions m x m (that is, Y[m, m]). This variable contains the Cholesky decomposition, such that
where Y is a lower triangular matrix with strictly positive diagonal entries and Y* denotes the conjugate transpose of Y.
Note: If X is not symmetric positive-definite, then Y will be filled with missing values.

Optional Argument

validate
specifies an optional argument that can increase the processing speed by avoiding error checking. The argument can take the following values:
0 the matrix X will be checked for symmetry. This is the default if the validate argument is omitted.
1 the matrix is assumed to be symmetric.

Example

The following example uses the CHOL CALL routine:
proc fcmp;
   array xx[3,3] 2 2 3 2 4 2 3 2 6;
   array yy[3,3];
   call chol(xx, yy, 0);
   do i = 1 to 3;
      put yy[i, 1] yy[i, 2] yy[i, 3];
   end;
run;
SAS produces the following output:
Output from PROC FCMP and the CHOL CALL Routine
                                 The SAS System                                1

                               The FCMP Procedure

1.4142135624 0 0
1.4142135624 1.4142135624 0
2.1213203436 -0.707106781 1