Creating mean centered and compositional variables for multilevel analysis in RStudio @mikecrowson2462
Creating mean centered and compositional variables for multilevel analysis in RStudio  @mikecrowson2462
Uploaded January 2024 | Updated September 2026, 2 weeks ago
This video demonstrates a common pre-processing step that is carried out prior to performing multilevel modeling using RStudio: creating mean-centered (either grand mean centered or group mean centered) Level 1 predictors and/or compositional variables (i.e., aggregates of Level 1 predictors). In this presentation, I rely on R code described in chapter 6 of Huang's (2023) text, Practical Multilevel Modeling (see here us.sagepub.com/en-us/nam/practical-multilevel-modeling-using-r/book276872#reviews).

You can download a copy of the data file I reference in the video here:
drive.google.com/file/d/182P_ZkgqlC9VqzQhJNl4xInwf33J4que/view

Feel free to download the following supplemental documents:
drive.google.com/file/d/1pOYaOtoDw76UcFq_Wy_L7wqbFWhIEzYS/view
drive.google.com/file/d/1oYJFp49V5r-n8EdqqQD0pk5ea4jLdDvN/view
Creating mean centered and compositional variables for multilevel analysis in RStudioHierarchical binary logistic regression using Stata (April, 2021)Multivariate multilevel model SPSS 28 (March 2022)How to perform a Kruskal-Wallis one-way ANOVA and Dunns post hoc tests using SPSS (Feb 2021)How to compute composite variables in SPSS: Examples using (fictional) survey and performance dataRepeated measures ANOVA with two within-subjects factors SPSS 29 (Sept 2023)Addendum to video on simple and parallel mediationIntroduction to path analysis with manifest variables using AMOS Oct 2020Custom mediation models using Process macro with SPSS: An introduction (August 2023)Parallel analysis for PCA and EFA in SPSS using OConnors syntaxComputing Clopper-Pearson confidence intervals for proportions using SPSS (Q1, 2024)How to perform the Mann Whitney test using SPSS (Feb 2021)
Mike Crowson |

Creating mean centered and compositional variables for multilevel analysis in RStudio

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER