rCholWishart {CholWishart} R Documentation

## Cholesky Factor of Random Wishart Distributed Matrices

### Description

Generate n random matrices, distributed according to the Cholesky factorization of a Wishart distribution with parameters `Sigma` and `df`, W_p(Sigma, df) (known as the Bartlett decomposition in the context of Wishart random matrices).

### Usage

```rCholWishart(n, df, Sigma)
```

### Arguments

 `n` integer sample size. `df` numeric parameter, "degrees of freedom". `Sigma` positive definite (p * p) "scale" matrix, the matrix parameter of the distribution.

### Value

a numeric array, say `R`, of dimension p * p * n, where each `R[,,i]` is a Cholesky decomposition of a sample from the Wishart distribution W_p(Sigma, df). Based on a modification of the existing code for the `rWishart` function.

### References

Anderson, T. W. (2003). An Introduction to Multivariate Statistical Analysis (3rd ed.). Hoboken, N. J.: Wiley Interscience.

Mardia, K. V., J. T. Kent, and J. M. Bibby (1979) Multivariate Analysis, London: Academic Press.

A. K. Gupta and D. K. Nagar 1999. Matrix variate distributions. Chapman and Hall.

`rWishart`, `rInvCholWishart`

### Examples

```# How it is parameterized:
set.seed(20180211)
A <- rCholWishart(1L, 10, 3*diag(5L))[,,1]
A
set.seed(20180211)
B <- rInvCholWishart(1L, 10, 1/3*diag(5L))[,,1]
B
crossprod(A) %*% crossprod(B)

set.seed(20180211)
C <- chol(stats::rWishart(1L, 10, 3*diag(5L))[,,1])
C
```

[Package CholWishart version 1.1.0 Index]