# Multilevel Moderation with nested data and repeated measures

I am currently trying to test a moderated mediation model with nested data and repeated measures.

My independent, moderator, mediator, and dependent variables are on the individual level. I used repeated measures and collected the data for all variables from individual respondents on 6 different points in time. These individual respondents were nested in groups. I had too few respondents to examine time series per individual and therefore decided to make a cross-sectional data file. This file is structured as following (considering two hypothetical respondents residing in different groups):

Respondent# - Time - Group
1 - 1 - 1
1 - 2 - 1
1 - 3 - 1
1 - 4 - 1
1 - 5 - 1
1 - 6 - 1
2 - 1 - 2
2 - 2 - 2
2 - 3 - 2
2 - 4 - 2
2 - 5 - 2

I am wondering if it is statistically possible to conduct an individual-level moderated mediation that takes nesting in groups/time into account, using this data. I could not find any resources for this type of analysis (I did find a syntax for testing a multilevel moderated mediation with a level 2 moderator. However, my model includes a level 1 moderator).

Also, if you have experience with this sort of analysis, I would greatly appreciate if you could share the syntax (e.g., for Mplus) you used. Your help is very welcome!

• If you're just asking for how to write code, your post would be off topic. – Glen_b Aug 8 '16 at 8:44
• Thanks, I reworded the question to get to its statistical core. – S. Sebastian Aug 8 '16 at 8:53
• This question is far to broad and i.m.o. off topic – Huub Hoofs Aug 29 '16 at 10:39

i = y1 + y2 + y3 + y4 + y5 + y6 s = 0*y1 + 1*y2 + 2*y3 + ... +5*y6
The relation between the covariate and individual outcomes can then be formulated using an edge relating the latent i and s to the baseline measure of the covariate: as a note, I'm assuming when you say "individual level" you mean that the covariate and mediator are not time varying and were collected at baseline. The regression coefficients relating these would then be total effects which can be decomposed into the indirect (mediated) effect and direct effect.
As with other types of analyses your path model would be decomposed further in relating the covariate x to i and s with a direct edge and two edges passing through m call it a for the covariate-to-mediator effect, then bi and bs for the mediator-to-randomintercept/randomslope effect. Then the test of significance for a*bi and a*bs would infer whether the mediator led to changes in growth or mean differences.