rIW {MCMCglmm} | R Documentation |
Samples from the inverse Wishart distribution, with the possibility of conditioning on a diagonal submatrix
rIW(nu,V,split=NULL, n=1)
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 |
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.
if n
= 1 a matrix equal in dimension to V
, if n
>1 a
matrix of dimension n
x length(V)
Jarrod Hadfield j.hadfield@ed.ac.uk
Korsgaard IR et. al. 1999 Genetics Selection Evolution 31 (2) 177:181
rwishart
n<-10 V<-diag(4) rIW(n, solve(n*V), split=2)