Gibbs update of the per-period additive effects under the AR(1) state model with stationary initial condition. For each actor and period the full conditional combines the AR(1) bridge prior (stationary init at t = 1) with the dyadic residual likelihood: resid_ij = a_i + b_j + e_ij, e_ij ~ N(0, s2). The reciprocal effect (b_j for the a-step, the freshly updated a_i for the b-step) is subtracted from each residual, missing residuals are skipped, and for symmetric networks each dyad contributes exactly once (resid(i,j) = a_i + a_j + e_ij).
sample_dynamic_ab_cpp(
a_current,
b_current,
Z_array,
EZ_array,
rho_ab,
sigma_ab,
s2,
symmetric
)List with updated a and b arrays
Current 2D array of row effects (n x T)
Current 2D array of column effects (n x T)
3D array of latent positions (n x n x T)
3D array of expected values without additive effects (n x n x T)
AR(1) parameter for additive effects
Innovation standard deviation
Dyadic residual variance
Whether the network is symmetric