Skip to contents

Draws a new value of the dyadic correlation rho from its full conditional using a random-walk-style Metropolis-Hastings step. Each dyad's pair of directed residuals is modelled as bivariate normal with unit variances (after scaling by the dyadic variance) and correlation rho; the proposal is a normal truncated to (-1, 1) and the acceptance ratio combines the bivariate-normal log-likelihood, the prior of rho, and the truncated-proposal normaliser.

Usage

rrho_mh(Z, rho, s2 = 1, offset = 0, asp = NULL)

Arguments

Z

n x n normal relational matrix.

rho

current value of rho.

s2

current value of the dyadic variance.

offset

matrix matching Z; Z - offset is treated as dyadic noise (so it should absorb any additive/multiplicative effects).

asp

NULL (the default), TRUE or FALSE: the prior of rho. NULL is the prior of ame and lame, flat on \((-1, 1)\); TRUE is the arc-sine prior, with density proportional to \((1 - \rho^2)^{-1/2}\); FALSE is the uniform prior.

Value

a new (scalar) value of rho.

Details

Exactly degenerate residual pairs (every pair exactly equal, or every pair exactly opposite) can make the correlation conditional improper on the full interval: with the default (uniform) prior from two dyads and with the arc-sine prior from one. Such configurations raise an error before a proposal is drawn.

Author

lame authors