Draws the covariance matrix of the stacked multiplicative row/column effects \([U, V]\) from its full conditional inverse-Wishart distribution in the AME model.
Arguments
- U
matrix of multiplicative row effects (n x R).
- V
matrix of multiplicative column effects (n x R).
- Suv0
prior scale matrix (2R x 2R). Defaults to the identity, a weakly informative choice.
- kappa0
prior degrees of freedom. Defaults to 2 + 2R, the smallest value giving a proper prior for a 2R x 2R covariance.
Value
The sampled 2R x 2R covariance matrix for \([U, V]\): the leading R x R block is the covariance of U, the trailing R x R block is the covariance of V, and the off-diagonal blocks are the U-V cross-covariances.
Details
Stacking the effects columnwise as \(W = [U, V]\), the conjugate
inverse-Wishart update combines the prior scale kappa0 * Suv0
with the residual cross-product crossprod(W) and adds the n
observed rows to the degrees of freedom. A draw from the inverse
Wishart is obtained by drawing from the Wishart with the inverted
scale matrix (via rwish) and inverting the result.