Within-between effects, splines and longitudinal data I am trying to understand some of the intricacies of modelling time-varying covariates (tvc’s) in longitudinal studies. I am taking some cues from the following paper:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3059070/
From what I can understand, the basic mixed model incorporating the covariate as it stands will generate a coefficient for that variable that is kind of a weighted average of within and between effects.
If you want to get more fine-grained in disentangling within and between effects you could person-centre that covariate and include the person-mean and person-centred variables as separate covariates in the model, thus giving estimates of between and within effects, respectively (but this really only applies in the case of the covariate not being associated with time [within-person covariate trajectories are flat]). If the tvc is in fact associated with time, additional work is required to model this correctly (I think they go into explaining that in the paper).
There are two things I’m interested in knowing:
How often do people in practice go to the trouble of disaggregating effects for a tvc? Perhaps this is important if it’s your main exposure of interest…
If we want to use splines to model non-linear effects on the tvc, is it necessary (or even possible) to disaggregate within and between effects?
Looking for practical pointers and tips.
Thanks.

There are several important considerations for time-varying covariates for longitudinal outcomes:

*

*If the time-varying covariate is exogenous or endogenous: That is, if the value of the covariate at a time point $t$ is associated only with its history or it is also with the history of the outcome before $t$.


*The functional form: Is the value of the longitudinal outcome at $t$ associated with the value of the covariate at the same time point or also previous time points (e.g., lagged effects).


*Time-varying confounding: The value of the longitudinal outcome at $t$ may predict both later outcomes and subsequent covariate values.
A good overview of these topics is given in Chapter 12 of the Analysis of Longitudinal Data, 2nd Edition.
