Hi Statalisters,
I am trying to fit what I thought would be a simple multilevel mediation model of the type 2-2-1 (Preacher et al, 2010; Krull & MacKinnon, 2001 and many others).
This is what the variables look like:
DV is a level 1
IV is a level 2
MV is a level 2
CNT1 is a level 1
CNT2 is a level 2
org_id is the level 2 clustering variable
For the sake of completeness, I have data on directors nested within 65 boards. Data are taken at the same point in time and are all observed data (e.g. no latent).
I have some questions that are bugging me as I do not have access to MPLUS that seems used largely in prior studies fitting 2-2-1 models (Super et al 2016; Lehman-Willenbrok et al 2015).
I guess the main question is: which command should I use in STATA 14.2? I have tried with the following ones but not sure which one is more appropriate in the estimation to avoid conflating results:
1. ml_mediation
code:
ml_mediation, dv(dv) iv(iv) mv(mv) l2id(org_id) cv(CNT1 CNT2)
When I try to estimate the model I do not succeed (e.g. Iteration 59: log likelihood = 8131.7637 (not concave)).
It seems to me that given the path a is a 2-2 (MV on IV) the model cannot converge.
Next I try to bootstrap as follows:
bootstrap indeff=r(ind_eff) direff=r(dir_eff) toteff=r(tot_eff), ///
reps(500) seed(1) cluster(org_id) idcluster(norg_id): ///
ml_mediation, dv(dv) iv(iv) mv(mv) l2id(org_id) cv(CNT1 CNT2)
estat boot, percentile bc
2. xtmixed
I get the same when I try to use xtmixed and specify the clustering at the org_id level. The problem occurs in the estimation of path a (MV --> IV) whereas I am able to estimate Eq2 and Eq3 using the xtmixed, rmle.
The code is as follows:
*Eq - path c (total effect) (DV --> IV)
mixed dv iv CNT1 CNT2 || org_id:, reml
*Eq - path a (MED --> IV)
mixed MV IV CNT1 CNT2 || org_id:, reml
** this one cannot be estimated. Only if I remove the clustering it will work. **
*Eq - path b (DV --> MED) & c' (DV --> IV)
mixed DV MV IV CNT1 CNT2 || org_id:, reml
3. GSEM
I have tried with the GSEM routine
gsem (MV <- IV CNT1 CNT2) (DV <- MV IV CNT1 CNT2 M1[org_id])
I can estimate this one but if I introduce clustering in the first bracket - nothing works.
Then I test the indirect/direct effects as follows:
nlcom _b[DV:MV]*_b[MV:IV]
nlcom _b[DV:IV] + _b[DV:MV]*_b[MV:IV]
Could you please help me understand which one of these is correct and what I am doing wrong?
The alternative I see is using a MLM with estimation of two models as separate (Chen et al 2007 J of App Psy is a great example but the execution seems old style).
Best regards and I am extremely thankful for your support.
Amedeo
I am trying to fit what I thought would be a simple multilevel mediation model of the type 2-2-1 (Preacher et al, 2010; Krull & MacKinnon, 2001 and many others).
This is what the variables look like:
DV is a level 1
IV is a level 2
MV is a level 2
CNT1 is a level 1
CNT2 is a level 2
org_id is the level 2 clustering variable
For the sake of completeness, I have data on directors nested within 65 boards. Data are taken at the same point in time and are all observed data (e.g. no latent).
I have some questions that are bugging me as I do not have access to MPLUS that seems used largely in prior studies fitting 2-2-1 models (Super et al 2016; Lehman-Willenbrok et al 2015).
I guess the main question is: which command should I use in STATA 14.2? I have tried with the following ones but not sure which one is more appropriate in the estimation to avoid conflating results:
1. ml_mediation
code:
ml_mediation, dv(dv) iv(iv) mv(mv) l2id(org_id) cv(CNT1 CNT2)
When I try to estimate the model I do not succeed (e.g. Iteration 59: log likelihood = 8131.7637 (not concave)).
It seems to me that given the path a is a 2-2 (MV on IV) the model cannot converge.
Next I try to bootstrap as follows:
bootstrap indeff=r(ind_eff) direff=r(dir_eff) toteff=r(tot_eff), ///
reps(500) seed(1) cluster(org_id) idcluster(norg_id): ///
ml_mediation, dv(dv) iv(iv) mv(mv) l2id(org_id) cv(CNT1 CNT2)
estat boot, percentile bc
2. xtmixed
I get the same when I try to use xtmixed and specify the clustering at the org_id level. The problem occurs in the estimation of path a (MV --> IV) whereas I am able to estimate Eq2 and Eq3 using the xtmixed, rmle.
The code is as follows:
*Eq - path c (total effect) (DV --> IV)
mixed dv iv CNT1 CNT2 || org_id:, reml
*Eq - path a (MED --> IV)
mixed MV IV CNT1 CNT2 || org_id:, reml
** this one cannot be estimated. Only if I remove the clustering it will work. **
*Eq - path b (DV --> MED) & c' (DV --> IV)
mixed DV MV IV CNT1 CNT2 || org_id:, reml
3. GSEM
I have tried with the GSEM routine
gsem (MV <- IV CNT1 CNT2) (DV <- MV IV CNT1 CNT2 M1[org_id])
I can estimate this one but if I introduce clustering in the first bracket - nothing works.
Then I test the indirect/direct effects as follows:
nlcom _b[DV:MV]*_b[MV:IV]
nlcom _b[DV:IV] + _b[DV:MV]*_b[MV:IV]
Could you please help me understand which one of these is correct and what I am doing wrong?
The alternative I see is using a MLM with estimation of two models as separate (Chen et al 2007 J of App Psy is a great example but the execution seems old style).
Best regards and I am extremely thankful for your support.
Amedeo
Comment