dwishart: Wishart Density

Description Usage Arguments Details Value Note Examples

View source: R/transform.R

Description

Calculate the density for a Wishart model

Usage

1
2
3
4
5
6
7
8
9
dwishart(
  W = NULL,
  x = NULL,
  W_chol = NULL,
  V_chol,
  df,
  lower_chol = FALSE,
  log = FALSE
)

Arguments

W

A Wishart matrix, Default: NULL

x

A latent parameter vector for Wishart model, Default: NULL

W_chol

The Cholesky factor of a Wishart matrix, Default: NULL

V_chol

The Cholesky factor of the V-parameter for a Wishart model

df

The Wishart degrees of freedom parametre

lower_chol

TRUE if lower triangular Cholesky factors are used, Default: FALSE

log

If TRUE, return the log-density, Default: FALSE

Details

This function requires the CholWishart::lmvgamma function from the CholWishart package.

Value

The density or log-density (if log == TRUE) for W, or the W matrix constructed from a Cholesky factor W_chol

Note

This is an internal non-exported function

Examples

1
2
3
4
5
6
## Not run: 
if (interactive()) {
  # EXAMPLE1
}

## End(Not run)

finnlindgren/multiprobit documentation built on June 20, 2020, 6:12 a.m.