This function automates the analysis of longitudinal clinical data using linear mixed models. It models clinical variables and returns a weighted matrix of model coefficient scores.
lmm_analysis(
clinical_data,
variables_to_scale,
random_effects = "(1 | participant_id)"
)A matrix of model coefficient scores, where rows represent dependent variables and columns represent independent variables.
Dataframe containing clinical and metadata for participants, including identifier as participant_id.
Character vector of variable names to be analyzed.
A character string specifying the random effects formula (default: "(1 | participant_id)").