help xtcenter

Title

xtcenter -- Disaggregate within and between-person effects by centering variables for mixed and melogit models

Syntax

xtcenter timevarcovar , i(panel_var) [ options]

Main
i(panel_var) nested group id, default is panel_var from xtset

interaction forces centering of binary time-varying covariates

replace replaces existing variables written in the data set

weights, if, in, and by are not allowed.

Description

xtcenter
This program centers and parses multi-level variance for use with melogit and mixed commands.
The program takes one time-varying covariate and one nesting variable in options. The program will automatically center continuous variables, but will only center binary variables if interaction is specified.

Results

xtcenter writes the following two variables to your data set:

timevarcovar_zti - within-person centered mean (or proportion) of the time-varying covariate

timevarcovar_zbari - grand mean (or proportion) centered of the time-varying covariate

Author

Eldin Dzubur, MS

Department of Preventive Medicine

University of Southern California

Los Aneles, CA

dzubur@usc.edu

Reference

Curran, P. J., & Bauer, D. J. (2011). The disaggregation of within-person and between-person effects in longitudinal models of change. Annual review of psychology, 62, 583.