dot-center_predictors: Internal Helper Function for Mean-Centering

.center_predictorsR Documentation

Internal Helper Function for Mean-Centering

Description

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.

Usage

.center_predictors(df, formula, subject_id_col = ".PowR_id")

Arguments

df

The dataframe to process

formula

The lme4 formula to extract predictors

subject_id_col

The name of the subject identifier column

Value

Dataframe with centered predictors


PowRPriori documentation built on May 12, 2026, 5:06 p.m.