Compute each event's total random-effect contribution from a flattened re_effect[D, total_re_levels] matrix (as emitted by the generic Stan models' generated re_effect, or reconstructed R-side from posterior draws of z_re/tau_re/L_corr_re). This is the SINGLE generic helper every downstream mu-reconstruction site should call instead of hand-summing hospital_effect/patient_effect/admission_effect.
Source:R/random_effects_generic.R
re_contribution.RdCompute each event's total random-effect contribution from a flattened re_effect[D, total_re_levels] matrix (as emitted by the generic Stan models' generated re_effect, or reconstructed R-side from posterior draws of z_re/tau_re/L_corr_re). This is the SINGLE generic helper every downstream mu-reconstruction site should call instead of hand-summing hospital_effect/patient_effect/admission_effect.