Multilevel Serial Mediation

32 views
Skip to first unread message

Aishwarya Verma

unread,
Sep 18, 2025, 7:23:46 AM (7 days ago) Sep 18
to DataAnalysis
Dear All,

I am looking for some guidance on how to conduct a multilevel serial mediation using either R or Mplus. I have my predictor variable at level-2 and the mediators (2 mediators) and the outcome at level-1 (2-1-1-1).

I am new to Mplus and have tried to write the code. I am unsure if it is correct. This is based on the syntax file provided by Preacher et al. on the MPlus website.

Here is my code:
VARIABLE:
  NAMES = id age mot es effec;
  USEVARIABLES = age mot es effec id;
  CLUSTER = id;
  BETWEEN = age;
  MISSING = ALL (-9999);

ANALYSIS:
  TYPE = TWOLEVEL;
  BOOTSTRAP = 10000;
 
MODEL:
%WITHIN%
 es mot effec;
 es ON mot (w1);
 effec ON es (w2);
 effec ON mot (w3);

%BETWEEN%
  age es mot effec;
  mot ON age (b1);
  es ON age (b2);
  effec ON age (c);
  effec ON es (b3);
  effec ON mot (b4);
  es ON mot (b5);

MODEL CONSTRAINT:
NEW(indb);
indb=b1*b2*b3*b4*b5;
   

OUTPUT:
  TECH1 TECH8 CINTERVAL;

Any guidance will be appreciated. 

Thanks,
Aishwarya 

Aishwarya Verma

unread,
10:42 AM (8 hours ago) 10:42 AM
to DataAnalysis
Anyone looking for the code for multilevel serial mediation analysis in Mplus (2-1-1-1), can adopt the one below: 

VARIABLE:
  NAMES = id y m1 m2 x;
  USEVARIABLES =  id y m1 m2 x  ;
  CLUSTER = id;
  BETWEEN = x;

  MISSING = ALL (-9999);

ANALYSIS:
  TYPE = TWOLEVEL RANDOM;
 
MODEL:
%WITHIN%
  y m1 m2;
  y ON m2 (b3);
  m2 ON m1 (b2);
  y ON m1(b5);

%BETWEEN%
  y m1 m2 x;
  m1 ON x (b1);
  m2 ON x(b4);
  y ON x (c);
  y ON m2 (b3);
  m2 ON m1 (b2);
  y ON m1(b5);

MODEL CONSTRAINT:
    NEW (indb indm1 indm2 tind);
    indb = b1*b2*b3;
    indm1 = b1*b5;
    indm2 = b4*b3;
    tind = b1*b2*b3 + b1*b5 + b4*b3;

OUTPUT:
   TECH1 TECH8 CINTERVAL;

Thanks!
Reply all
Reply to author
Forward
0 new messages