| .center_predictors | R Documentation |
This helper function is responsible for the mean centering of predictors. It detects whether any given predictor is repeated within clusters (e.g. repeated measurements in participants) and automatically applies within-cluster mean centering if this is the case. In all other cases, grand mean centering is applied.
.center_predictors(df, formula, subject_id_col = ".PowR_id")
df |
The dataframe to process |
formula |
The lme4 formula to extract predictors |
subject_id_col |
The name of the subject identifier column |
Dataframe with centered predictors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.