help for mlmcenter

Title

mlmcenter -- Center variables for multilevel modeling

Syntax

mlmcenter varlist [if] [in]
[, options]

cluster(varname) clustering variable (required for group/both)

type(string) centering type: grand (default), group, or both

suffix_within(string) suffix for within-centered variable; default _within

suffix_between(string) suffix for between (cluster mean) variable; default _between

Description

mlmcenter centers one or more numeric variables for use in multilevel
models. Three centering strategies are available:

grand: subtract the overall (grand) mean. Creates varname_c.

group: subtract the cluster mean (within-cluster centering).
Creates varname_c.

both: within-between decomposition. Creates both a within-centered variable
(varname_within by default) and the cluster mean (varname_between).

Examples

Grand-mean center SES:

. mlmcenter ses, type(grand)

Group-mean center SES within schools:

. mlmcenter ses, cluster(school) type(group)

Within-between decomposition:

. mlmcenter ses, cluster(school) type(both)

Author

Subir Hait, Michigan State University. https://github.com/causalfragility-lab/mlmoderator

Also see

mlmprobe, mlmjn, mlmplot, mlmsummary,
mlmsens, mlmvdecomp