Description Usage Arguments Value Author(s) References See Also Examples
For centering level-1 variables, either with person-mean (i.e., within-person) or grand-mean centering. Using the function will output a new dataset with both the centered and group mean variables.
1 |
data |
dataset stored as dataframe |
user_id |
the name of the level-2 grouping variable (e.g., person id); can be stored as a factor, numeric, or integer within a dataframe |
var_id |
the name of the level-1 variable you want to center; should be stored as numeric or integer within a dataframe |
type |
the type of centering you want to use, either person-mean centering |
a dataframe with a centered variable appended to it; if using person-mean centering, the person-mean variable will also be appended
Myles A. Maillet, myles.a.maillet@gmail.com
Hoffman, L., & Stawski, R. S. (2009). Persons as contexts: Evaluating between-person and within-person effects in longitudinal analysis. Research in Human Development, 6(2-3), 97-120.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.