draw_wishart: Simulate one draw from the Wishart distribution

Description Usage Arguments Details Value Examples

Description

Simulate one draw from the Wishart distribution

Usage

1

Arguments

v

An integer, the degrees of freedom of the distribution.

S

A numeric matrix, the scale matrix of the distribution.

Details

Employs the Bartlett Decomposition (Smith & Hocking 1972). Output exactly matches that of rwish from the MCMCpack package if the same random seed is used.

Value

A column vector containing the draw.

Examples

1
2
M <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
draw_wishart(10, M)

fditraglia/zoofactr documentation built on May 16, 2019, 12:12 p.m.