Skip to content

Commit b934d1c

Browse files
committed
more detailed documentation for CorrCholeskyFactor
1 parent 911cd3d commit b934d1c

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Unreleased
2+
3+
- minor doc updates for CorrCholeskyFactor
4+
15
# 0.3.2
26

37
- Check length of inputs for CorrCholeskyFactor

src/special_arrays.jl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,21 @@ end
9090
9191
Cholesky factor of a correlation matrix of size `n`.
9292
93-
Transforms ``n×(n-1)/2`` real numbers to an ``n×n`` upper-triangular matrix `Ω`, such that
94-
`Ω'*Ω` is a correlation matrix (positive definite, with unit diagonal).
93+
Transforms ``n×(n-1)/2`` real numbers to an ``n×n`` upper-triangular matrix `U`, such that
94+
`U'*U` is a correlation matrix (positive definite, with unit diagonal).
95+
96+
# Notes
97+
98+
If
99+
100+
- `z` is a vector of `n` IID standard normal variates,
101+
102+
- `σ` is an `n`-element vector of standard deviations,
103+
104+
- `U` is obtained from `CorrCholeskyFactor(n)`,
105+
106+
then `U' * Diagonal(σ) * z` will be a multivariate normal with the given variances and
107+
correlation matrix `U' * U`.
95108
"""
96109
@calltrans struct CorrCholeskyFactor <: VectorTransform
97110
n::Int

0 commit comments

Comments
 (0)