Density for the inverse Wishart distribution.
dInverseWishart(Sigma, sum.of.squares, nu, logscale = FALSE,
log.det.sumsq = log(det(sum.of.squares)))InverseWishartPrior(variance.guess, variance.guess.weight)
dInverseWishart
returns the scalar density (or log density) at
the specified value. This function is not vectorized, so only one
random variable (matrix) can be evaluated at a time.
InverseWishartPrior
returns a list that encodes the parameters
of the distribution in a format expected by underlying C++ code.
Argument (random variable) for the inverse Wishart distribution. A positive definite matrix.
The "degrees of freedom" parameter of the inverse Wishart
distribution. The distribution is only defined for nu >=
nrow(Sigma) - 1
.
A positive definite matrix. Typically this is the sum of squares that is the sufficient statistic for the inverse Wishart distribution.
Logical. If TRUE
then the density is returned
on the log scale. Otherwise the density is returned on the density
scale.
The log determinant of sum.of.squares
. If
this function is to be called many times then precomputing the log
determinant can save considerable compute time.
A prior guess at the value of the variance matrix the prior is modeling.
A positive scalar indicating the number
of observations worth of weight to place on variance.guess
.
Steven L. Scott steve.the.bayesian@gmail.com
The inverse Wishart distribution has density function $$ \frac{|Sigma|^{-\frac{\nu + p + 1}{2}} \exp(-tr(\Sigma^{-1}S) / 2)}{ 2^{\frac{\nu p}{2}}|\Sigma|^{\frac{\nu}{2}}\Gamma_p(\nu / 2)}% $$
dWishart
,
rWishart
,
NormalInverseWishartPrior