dist.Scaled.Inverse.Wishart: Scaled Inverse Wishart Distribution

Description Usage Arguments Details Value References See Also Examples

Description

These functions provide the density and random number generation for the scaled inverse Wishart distribution.

Usage

1
2
   dsiw(Q, nu, S, zeta, mu, delta, log=FALSE)
   rsiw(nu, S, mu, delta)

Arguments

Q

This is the symmetric, positive-definite k x k matrix \textbf{Q}.

nu

This is the scalar degrees of freedom, nu regarding \textbf{Q}. The default recommendation is nu=k+1.

S

This is the symmetric, positive-semidefinite k x k scale matrix S regarding \textbf{Q}. The default recommendation is S=diag(k).

zeta

This is a positive-only vector of length k of auxiliary scale parameters zeta.

mu

This is a vector of length k of location hyperparameters mu regarding zeta.

delta

This is a positive-only vector of length k of scale hyperparameters delta regarding zeta.

log

Logical. If log=TRUE, then the logarithm of the density is returned.

Details

The scaled inverse Wishart (SIW) distribution is a prior probability distribution for a covariance matrix, and is an alternative to the inverse Wishart distribution.

While the inverse Wishart distribution is applied directly to covariance matrix Sigma, the SIW distribution is applied to a decomposed matrix \textbf{Q} and diagonal scale matrix zeta. For information on how to apply it to \textbf{Q}, see the example below.

SIW is more flexible than the inverse Wishart distribution because it has additional, and some say somewhat redundant, scale parameters. This makes up for one limitation of the inverse Wishart, namely that all uncertainty about posterior variances is represented in one parameter. The SIW prior may somewhat alleviate the dependency in the inverse Wishart between variances and correlations, though the SIW prior still retains some of this relationship.

The Huang-Wand (dhuangwand) prior is a hierarchical alternative.

Value

dsiw gives the density and rsiw generates random deviates.

References

O'Malley, A.J. and Zaslavsky, A.M. (2005), "Domain-Level Covariance Analysis for Survey Data with Structured Nonresponse".

See Also

dhuangwand, dinvwishartc, dmvn, and dwishart.

Examples

1
2
3
4
5
6
7
8
9
library(LaplacesDemon)
### In the model specification function, input U and zeta, then:
# Q <- t(U) %*% U
# Zeta <- diag(zeta)
# Sigma <- Zeta %*% Q %*% Zeta
# Sigma.prior <- dsiw(Q, nu=Data$K+1, S=diag(Data$K), zeta, mu=0, delta=1)
### Examples
x <- dsiw(diag(3), 4, diag(3), runif(3), rep(0,3), rep(1,3), log=TRUE)
x <- rsiw(4, diag(3), rep(0,3), rep(1,3))

LaplacesDemon documentation built on July 1, 2018, 9:02 a.m.