Skip to contents

Draws jointly from the full conditional of the regression coefficients beta together with the additive sender/receiver effects a, b for a single social-relations regression matrix. The within-dyad reciprocity covariance is whitened so every directed cell becomes a unit-variance Gaussian observation, the additive-effect prior N(0,Sab) is written through a square-root factor so a rank-deficient Sab is handled without inverting it, and the complete joint Gaussian precision over (beta, factors) is assembled from cell-level sufficient statistics and sampled in one draw.

Usage

rbeta_ab_fc(
  Z,
  Sab,
  rho,
  X = NULL,
  s2 = 1,
  offset = 0,
  iV0 = NULL,
  m0 = NULL,
  g = length(Z)
)

Arguments

Z

n x n relational matrix (multiplicative effects already removed)

Sab

2 x 2 covariance of the additive row/column effects

rho

within-dyad (reciprocity) correlation

X

n x n x p covariate design array

s2

dyadic variance

offset

matrix subtracted from Z before sampling

iV0

prior precision for beta; a g-prior is used when NULL

m0

prior mean for beta; zero when NULL

g

g-prior variance scale used when iV0 is NULL

Value

beta

regression coefficients

a

additive row effects

b

additive column effects

Author

lame authors