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

fixed positive prior scale for s2 (default 1). Model-fitting callers compute a data-scaled value once before sampling; do not recompute this scale from current residuals within a chain.

Value

a single draw of s2

Author

lame authors