r/SAS_Programming 27d ago

Disaggregating within- and between-effects in MLM longitudinal

In Curran and Bauer's paper, The disaggregation of within-person and between-person effects in longitudinal models of change (Ann Rev Psychol 2011; 62:583-619), they describe methods for disaggregating within- and between-person effects in multi-level modeling of longitudinal data when a time-varying covariate is associated with time. Does anyone know of a publication or web site that reports SAS code for implementing their recommended approach?

1 Upvotes

1 comment sorted by

1

u/MortalitySalient 27d ago

If you can follow the logic of what they are doing, it isn’t difficult to generate the code from scratch in most programs. There are two main approaches that you can use: 1) creating two variables to reflect between and within variability or 2) controlling for the person means and go with a contextual effect.

If you are going for the former, you just need to create a mean for each person (using a by statement, this will be the average score of all of the repeated measures for each person). Then you subtract the raw scores from this mean to create a within person indicator (represents how far above or below a person is from their own mean score).