rIW {MCMCglmm}R Documentation

Random Generation from the Conditional Inverse Wishart Distribution

Description

Samples from the inverse Wishart distribution, with the possibility of conditioning on a diagonal submatrix

Usage

rIW(nu,V,split=NULL, n=1)

Arguments

nu degrees of freedom
V inverse scale matrix
split optional integer indexing the partition to be conditioned on
n integer: number of samples to be drawn

Details

split indexes the diagonal element of V which partitions V into 4 submatrices. split indexes the upper left corner of the lower diagonal matrix and it is this matrix that is conditioned on.

For example partioning V such that

V = V11 V12

V21 V22

the split indexes the upper left corner of V22. If dim(V)=4 and split=2 then V11 is a 1X1 matrix and V22 is a 3X3 matrix.

Value

if n = 1 a matrix equal in dimension to V, if n>1 a matrix of dimension n x length(V)

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

References

Korsgaard IR et. al. 1999 Genetics Selection Evolution 31 (2) 177:181

See Also

rwishart

Examples

n<-10
V<-diag(4)
rIW(n, solve(n*V), split=2)

[Package MCMCglmm version 1.06 Index]