1

There's a known between-person association of X and Y, and I'm trying to find out whether this association also holds on the within-person level by conducting a longitudinal study with 4 measurement occasions. My question is: How can I analyse both between- and within-person correlations at the same time? I'm hypothesizing two possible scenarios: A) there is a within-person association of X and Y, or B), as X changes, Y doesn't change (with Y beeing pretty constant in general), but within-person mean levels of X are associated with Y.

If I were only interested in the within-person correlation, I could specify a multilevel model as follows, with $\gamma_1$ giving the average within-person association (correct?):

$$Y_{it} = \beta_{oi} + \beta_{1i}X_{it}$$ $$ \beta_{ot}=\gamma_{0} + u_{0i} $$ $$ \beta_{1t}=\gamma_{1} + u_{1i} $$

But I'm not sure how to analyse between-person associations within this framework. Basically, I'm looking for something like a random-intercept cross-lagged panel model, but without the cross-effects.

Robn
  • 115
  • 4

1 Answers1

1

One way to do this, related to my response to this somewhat different question, is to include two predictors in your mixed model: $\bar x_i$, which is the mean value of $x$ for person $i$, and $\delta = x - \bar x_i$, which is how far $x$ is above or below that person's mean (e.g. it is mean centred for each person).

Leaving aside the longitudinal bit, which I don't fully understand from the question, your model is something like

y ~ 1 + mean_x + delta_x + (1 + delta_x | person)

where mean_x captures the between-person effect of x on y, and delta_x captures with within-person effect (which is allowed to vary across people as a random effect).

Eoin
  • 4,543
  • 15
  • 32
  • Thanks, that already helps a lot! Could you clarify on what you don't understand about the longitudinal part? Maybe I could edit my question. To investigate within person (co-)variation I have to take multiple measurements of X and Y. Maybe for bit of background: I'm not in an experimental setting but planning an observational study. – Robn Sep 23 '21 at 11:50
  • Ah, ok, so you're not trying to model changes over time or anything? In that case, I don't think anything needs to change here, but you should be careful to check that the values of y aren't autocorrelated - e.g. that the values at t1 and t2 aren't more similar than the values at t1 and t4. That's a different question though, really. – Eoin Sep 23 '21 at 13:27
  • I don't expect any systematic change of neither Y nor X (that's what you mean, right?). I also wouldn't expect Y to be autocorrelated, but could you tell me what the solution would be in that case? Include $Y_{i,t-1}$ as level-1 predictor? – Robn Sep 23 '21 at 13:40
  • Honestly, I don't know! I don't think lme4 can handle autocorrelated errors, but I think nlme (which I never use) can. – Eoin Sep 23 '21 at 13:43