gen_Wisha: Generate random samples from Wishart distribution...

Description Usage Arguments Details Value Examples

Description

This function generate random samples from Wishart distribution based on Bartlett’s decomposition.

Usage

1
gen_Wisha(d, n, Sigma)

Arguments

d

the dimension of the square matrix

n

degrees of freedom

Sigma

scale matrix

Details

Let T=(T[ij]) be a lower triangular d T[ij] T[ii] Then the matrix A=TT^T has a W[d](I[d],n) distribution Obtain the Choleski factorization Sigma=LL^T,where L is a lower triangular Then LAL^T

Value

The generated samples from W[d](Sigma,n)

Examples

1
2
3
4
5
## Not run: 
 Sigma=matrix(c(3,2,2,4),nrow=2)
 gen_Wisha(2,5,Sigma)

## End(Not run)

XixuHu/SC19090 documentation built on Jan. 2, 2020, 8:40 p.m.