Random-effects design matrix for one patient, across all biomarkers
Source:R/conditionalDesign.R
random_effects_design.RdShared helper for build_conditional_design(),
build_conditional_design_copula(), and process_variance():
builds each biomarker's random-effects design from the left-hand side of
its own long_sub_random formula (e.g. ~ 1, ~ year,
~ year + I(year^2)) and stacks them block-diagonally, matching the
block-diagonal Sigma_fit built by longitudinalSub().
Previously this assumed every biomarker had either a random intercept
only, or a random intercept plus a slope on time_variable, so a
mix of the two (or any other random-effects formula) failed with
"non-conformable arguments".