Rev Language Reference


dnLKJ - LKJ Distribution

The LKJ (Lewandowski-Kurowicka-Joe) distribution on correlation matrices with concentration parameter eta.

Usage

dnLKJ(RealPos eta, Natural dim)

Arguments

eta : RealPos (pass by const reference)
The parameter.
dim : Natural (pass by value)
The dimensions of the correlation matrix.

Domain Type

Details

The LKJ distribution is uniform over positive-definite correlation matrices when eta=1.The probability density of a correlation matrix under the LKJ distribution is:f(x) = det(x)^(eta - 1)

Example


# we simulate a correlation matrix.
R <- rLKJ(n=1, eta=1, dim=5)

# let's print the simulated correlation matrix
R

See Also