I am analysing the interaction of determinants (i) with time (x) on the outcome (y) in longitudinal, time-variant data collected 1 to 8 times in around 700 participants. I want to discuss if the determinant (i) or the outcome (y) started changing first. If I understood correctly, I should use the previous values for the determinant (i) as lagged variable? However, I also received a recommendation to use the previous outcome variable (y) as lagged variable. Now I am confused.
Can anyone recommend any literature about assessing the temporality in longitudinal data in R?