Forward-filter / backward-sample the AR(1) state-space model for the dynamic-block beta coefficients. Returns the joint draw of beta_dyn at every time period.
sample_beta_dynamic_cpp(
Xdyn_list,
Xstat_list,
Z_list,
offset_list,
beta_static,
rho_by_coef,
sigma_by_coef,
Lambda,
beta0_mean,
beta0_cov,
s2,
dyad_rho,
bipartite,
symmetric,
use_dyad_rho
)List with: path -- a (T x p_dyn) matrix of beta draws (one row per period); chol_fail -- integer count of Cholesky failures.
T-length list of (n*n) x p_dyn long-format design matrices for the dynamic block (column-major reshape per period).
T-length list of (n*n) x p_static long-format design matrices for the static block.
T-length list of (n x n) latent matrices.
T-length list of (n x n) offset matrices (a_i + b_j + U_i'V_j contributions; everything that's not in X*beta).
Length p_static current static beta vector.
Length p_dyn vector of AR(1) rho values for each dynamic coefficient. (Per-block but expanded per-column for vectorised indexing.)
Length p_dyn vector of AR(1) innovation standard deviations for each dynamic coefficient.
Block-diagonal innovation scale matrix (p_dyn x p_dyn). Combined with sigma^2 to give Q = sigma^2 * Lambda.
Length p_dyn prior mean for the first state beta_1 (the prior is placed directly on beta_1, no predict step at t = 1).
p_dyn x p_dyn prior covariance for beta_1. Must be a fixed matrix that does not depend on the current (rho, sigma) draw so the transition-only hyperparameter conditionals remain exact.
Dyadic variance.
Dyadic correlation (ignored when use_dyad_rho=FALSE).
Whether the network is bipartite.
Whether the network is symmetric.
Whether to use the dyad-corr branch (TRUE only for unipartite, asymmetric, with a non-zero rho).