| dist.Scaled.Inverse.Wishart {LaplacesDemon} | R Documentation |
Scaled Inverse Wishart Distribution
Description
These functions provide the density and random number generation for the scaled inverse Wishart distribution.
Usage
dsiw(Q, nu, S, zeta, mu, delta, log=FALSE)
rsiw(nu, S, mu, delta)
Arguments
Q |
This is the symmetric, positive-definite
|
nu |
This is the scalar degrees of freedom, |
S |
This is the symmetric, positive-semidefinite
|
zeta |
This is a positive-only vector of length |
mu |
This is a vector of length |
delta |
This is a positive-only vector of length |
log |
Logical. If |
Details
Application: Continuous Multivariate
Density: (see below)
Inventor: O'Malley and Zaslavsky (2005)
Notation 1:
p(\Sigma) \sim \mathcal{SIW}(\textbf{Q}, \nu, \textbf{S}, \zeta, \mu, \delta)Notation 2:
p(\Sigma) = \mathcal{SIW}(\Sigma | \textbf{Q}, \nu, \textbf{S}, \zeta, \mu, \deltaParameter 1: symmetric, positive-definite
k \times kmatrix\textbf{Q}Parameter 2: degrees of freedom
\nuParameter 3: symmetric, positive-semidefinite
k \times kscale matrix\textbf{S}Parameter 4: Auxiliary scale parameter vector
\zetaParameter 5: Hyperparameter location vector
\muParameter 6: Hyperparameter scale vector
\deltaMean:
Variance:
Mode:
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
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))