wishart: The Wishart Distribution

Description Usage Arguments Details Value Author(s) Examples

Description

Density function and random generation from the Wishart distribution.

Usage

1
2
   dwish(W, v, S)
   rwish(v, S)

Arguments

W

Positive definite matrix W (p x p).

v

Degrees of freedom (scalar).

S

Inverse scale matrix (p x p).

Details

The mean of a Wishart random variable with v degrees of freedom and inverse scale matrix S is vS.

Value

dwish evaluates the density at positive definite matrix W. rwish generates one random draw from the distribution.

Author(s)

Andrew D. Martin <admartin@wustl.edu>, Kevin M. Quinn <kquinn@law.berkeley.edu>, and Jong Hee Park <jhp@uchicago.edu>

Examples

1
2
3
4
5
## Not run: 
density <- dwish(matrix(c(2,-.3,-.3,4),2,2), 3, matrix(c(1,.3,.3,1),2,2))
draw <- rwish(3, matrix(c(1,.3,.3,1),2,2))

## End(Not run)

phcfM documentation built on May 30, 2017, 5:21 a.m.