Learn R Programming

MSBVAR (version 0.5.0)

ldwishart: Log density for a Wishart variate

Description

Computes log density for a Wishart random variable.

Usage

ldwishart(W, v, S)

Arguments

Value

A scalar, the value of the log density for the variate $W$ with mean $S$ and degrees of freedom $v$.

Details

Computes the log density for a Wishart variate with mean $S$ and degrees of freedom $v$. Special care has been taken to avoid underflow in the computation.

See Also

rwishart

Examples

Run this code
x <- matrix(rnorm(100), 50, 2)
XX <- crossprod(x)
ldwishart(solve(XX), 50, diag(2))

Run the code above in your browser using DataLab