I want to test a mediation model, where IV and mediator are continuous and DV is a count variable. It was no problem to specify the model itself but unfortunately MPlus (6.1) cannot determine indirect effects when using count data (error: "BOOTSTRAP is not allowed with ALGORITHM=INTEGRATION."). Is there any workaround (f.e. with MODEL CONSTRAINT command), so I can test the assumed mediation effect formally?
Thank you for the quick response. I'm not sure if I did it correct, but I finally specified a constraint model with 4IV, 1 Med and 1 Count-DV (see below). Is this the way you thought of? If possible, I additionally want to determine the overall mediation effect (med_total). According to Preacher & Hays (2008) the total indirect effect is the sum of the specific indirect effects. Unfortunately, they used the bootstrap-procedure to analyze indirect effects and they had several mediators, not several IVs. Do you think I can still apply this rule to the current model (like I have done)?
Thank you very much, Sebastian
Title: Mediation with model constraints 4 IV, 1 Med, 1 DV (count)
Data: File is MPLUS3.dat ; Variable: Names are age sex type y2 y1 y3 x4 x1 x2 x3 m2 m1 sq2 sq3 sq1; usevariables are y1 m1 x1 x2 x3 x4; count is y1; analysis: estimator=ml; model: m1 on x1 (a1); m1 on x2 (a2); m1 on x3 (a3); m1 on x4 (a4); y1 on m1 (b); y1 on x1 x2 x3 x4; Model Constraint: new (med1 med2 med3 med4 med_total); med1 = a1*b; med2 = a2*b; med3 = a3*b; med4 = a4*b; med_total = med1+med2+med3+med4; output: samp; stdyx; tech1;
In the model I am testing, I have a count mediator and continuous DV. The count variable's distribution is zero inflated negative binomial. Model specification is done for the zero inflation parameter as well and the model runs fine. However, my challenge is 1.)How to test for indirect effect? I read in one of your papers, it is incorrect to test just product (i.e. a * b) for non-continuous mediators. Could you please advice a sample Mplus code to properly do this please? 2.)How to bootstrap the indirect effects captured in step 1. I am unable to do with ESTI=MLR. 3.)How to test indirect effect for model in step 1 using ESTI=Bayes. 4.)As additional analysis I introduce a continuous moderator to model in step 1. Is it possible to test this model after properly undertaking the mediation with count variable?
A count mediator is a tricky situation. In the M on X regression you want to specify M as a count variable to get Poisson regression. But in the Y on M regression there isn't a way to treat M as count. There is not a continuous latent response variable formulation for count. So when you regress Y on M you have to treat M as continuous. I discuss it in the paper on our website
Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus.
Thanks a lot, Prof. I checked this paper and the new paper forthcoming in structural equation modeling. I don't see specific code for count mediator. Could you please share that code.
Also in my model I specify count as negative binomial (with zero inflation) rather than Poisson because the mean and variance are unequal. So is that possible as well or I should force fir a Poisson?
To above points, is it possible to test moderated mediation using the steps by Preacher et al for these types of count mediators? If so what would be the right formula to specify in the MODEL CONSTRAINT statement?
"The count variable can also be a mediator in which case the integral is replaced by a sum over the possible counts and using the probabilities determined by the Poisson distribution. Using m to predict y, m may be treated as continuous."
Although possible, I have not tried this out in Mplus and therefore don't have code for it. It is advanced stuff, so unless you are a statistical expert I would not recommend that you get into this. Instead you would have to make approximations such as treating the mediator as a continuous variable.
Prof. Muthen. Sorry I forgot to request before. Could you please suggest a reference or citation for considering count as continuous in these kind of situation please. It is becoming extremely challenging for me to convince reviewers.
Yan Liu posted on Thursday, May 15, 2014 - 11:03 am
Dear Dr. Muthen,
I want to use the multilevel mediational models based on SEM proposed by Preacher, Zyphur and Zhang (2010).
I have one predictor, one covariate, one mediator and one outcome, which were measured at individual level. In addition, I have another predictor, intervention (control vs. experiment), which was conducted at school level. When I treat the outcome as a continuous variable, the model works. However the model doesn't run when I define the outcome as a count variable using negative binomial (nb).
I wonder if negative binomial works for Preacher's multilevel mediational model. Many thanks!
You should have no problem estimating 2-level model with a DV that is nb. Whether or not mediation effects can be logically defined is another matter.
If you have problems with the run, send output and license number to Support.
Yan Liu posted on Thursday, May 15, 2014 - 8:34 pm
Thanks for your reply! Before I send you the output, I would like you to take a quick look and see if there are something wrong with my Mplus code. The error message shows that the X (predictor), Cov (covariate), and M (mediator) cannot be used at between level. They have to be defined at within level.
In addition, when I treat Y as continuous variable, the saddle point appears, so I decreased the criterion for MCONVERGENCE and increased the random starts.
USEVARIABLES ARE COV X M Y tchid; COUNT=Y (nb); MISSING=ALL(999); CLUSTER = tchid; ANALYSIS: TYPE = TWOLEVEL; STARTS=500; STITERATIONS=1000; INTEGRATION =GAUSSHERMITE; MCONVERGENCE=0.08;
MODEL: %WITHIN% M ON COV X (aw); Y ON COV X M (bw); %BETWEEN% M ON COV X (ab); Y ON COV X M (bb);
MODEL CONSTRAINT: NEW(indw indb); indw=aw*bw; indb=ab*bb;
I have analyses somewhat similar to what Sebastian Nitsche posted on Friday, March 11, 2011, but it is with a zero-inflated outcome. As a simplified example, say I have a continuous predictor (x), a continuous mediator (m), and a zero-inflated outcome (y). I have input for a zero-inflated model with indirect effect estimates below, and, following that, I’d be grateful for your feedback on some questions.
DATA: FILE IS data.dat; VARIABLE: NAMES ARE x m y count is y(i); USEVARIABLES ARE x m y Analysis: estimator = ml; Model: m on x(a); y on x m(b1); y#1 on x m(b2); model constraint: new (med_pois med_zero) med_pois = a*b1; med_zero = a*b2; output: cinterval
1) If I understand this correctly, this output produces indirect effect estimates, one of which is a product of linear and Poisson estimates and another which is a product of linear and logistic estimates. As each of these is the product of a linear estimate and a natural log estimate, do I interpret their product also as being on a natural log scale?
2) If I can interpret the indirect effect estimates as being on a natural log scale, can I exponentiate them and interpret them as rate (for the Poisson estimate) and odds (for the logistic estimate)?
The answers are in the following two papers (to be read in that order) on our website:
Muthén, B. & Asparouhov T. (2014). Causal effects in mediation modeling: An introduction with applications to latent variables. Forthcoming in Structural Equation Modeling. download paper show abstract
Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus. Click here to view the Technical appendix that goes with this paper and click here for the Mplus input appendix. Click here to view Mplus inputs, data, and outputs used in this paper. download paper contact author show abstract
I see now that version 7.2 can handle this mediation with the MODEL INDIRECT statement, which is very helpful - thank you! I do still have a question regarding output. Continuing with my previous example (continuous x, continuous m, zero-inflated y):
VARIABLE: NAMES ARE x m y count is y(i); USEVARIABLES ARE x m y Analysis: estimator = ml; Model: m on x; y on x m; y#1 on x m; model indirect: y ind m x; y#1 on m x;
Based on Muthén and Asparouhov (2014), I believe I have an understanding of the PNDE, TNIE, TNDE, and PNIE estimates (though I see these are only available with single mediation paths, unlike the above example).
However, I'm not clear on the output labeled "Specific indirect" (with multiple mediation paths, as above), or, in other cases, labeled "Indirect" and "Direct Effect" (with a single mediation path). Should these be exponentiated to interpret indirect and direct rates (for Poisson) and odds (for logistic)?
It sounds like what you are looking at are the Specific indirect effects referring to the old-fashioned effects, that is, effects for the Y log-rate (log-mean), not effects for the Y mean that the counterfactual output provides. Seems like we are in a bit of a gray area here regarding how we should handle this and what journals would accept. Perhaps the log-rate results are of some use, but it is not an optimal approach. You may also find this article useful since it discussed counterfactually-defined effects in the presence of multiple mediatiors: