Skip to contents

Draws the multiplicative-effect matrices U and V from their full conditional distributions, pooling information across the replicate slices of a residual array. Each factor column is updated in turn from its Gaussian full conditional, optionally under a hierarchical shrinkage prior on the stacked (U, V) rows.

Usage

rUV_rep_fc(E.T,U,V,rho,s2=1,shrink=TRUE,prior_df=NULL,prior_psi=NULL)

Arguments

E.T

Array of square residual relational matrices (additive effects and covariates removed). The third margin indexes replicates.

U

current value of U

V

current value of V

rho

Dyadic correlation: a scalar or one value per replicate.

s2

dyadic variance

shrink

adaptively shrink the factors with a hierarchical prior

prior_df

degrees of freedom of the inverse-Wishart prior of the covariance of the stacked (U, V) rows (default 2R + 2; the samplers pass the data-scaled default of ame(), see prior$kappa0 there)

prior_psi

the inverse-Wishart scale matrix prior_psi * I (default prior_df, the unit scale Suv0 = I)

Value

U

a new value of U

V

a new value of V

Details

Given its partner column, a factor column has a Gaussian conditional whose precision has one eigenvalue along the partner and a repeated eigenvalue perpendicular to it; the draw uses this closed form, with the symmetric and antisymmetric parts of the residual weighted by the reciprocal variances s2 (1 + rho) and s2 (1 - rho).

Author

lame authors