Skip to contents

Draw the dyadic residual variance s2 from its inverse-gamma full conditional. The residual matrix E = Z - offset is decorrelated within reciprocal dyad pairs and along the diagonal, and the pooled sum of squares (together with an optional scaled-inverse-chi-square prior) yields the posterior draw.

Usage

rs2_fc(Z, rho, offset = 0, nu0 = NULL, s20 = NULL)

Arguments

Z

n x n normal relational matrix

rho

current within-dyad correlation

offset

matrix conformable with Z; Z - offset is treated as pure dyadic noise (so it should carry the additive and multiplicative mean structure)

nu0

prior degrees of freedom (defaults to 1)

s20

prior scale for s2; when NULL the empirical mean of the decorrelated squared residuals is used so the prior sits at the data scale

Value

a single draw of s2

Author

lame authors