Testing a Mediation with Count data. PreviousNext
Mplus Discussion > Categorical Data Modeling >
 Sebastian Nitsche posted on Monday, March 07, 2011 - 2:15 am

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?

Thanks in advance,
 Linda K. Muthen posted on Monday, March 07, 2011 - 9:27 am
In this situation you can use MODEL CONSTRAINT to define the indirect effect.
 Sebastian Nitsche posted on Friday, March 11, 2011 - 6:26 am
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,

Title: Mediation with model constraints
4 IV, 1 Med, 1 DV (count)

File is MPLUS3.dat ;
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;
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;
 Linda K. Muthen posted on Friday, March 11, 2011 - 9:10 am
This looks correct.
 Sebastian Nitsche posted on Friday, March 11, 2011 - 11:47 am
Great. Thank you!
 S.Arunachalam posted on Friday, May 02, 2014 - 7:11 am
Respected Prof. Muthen.

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?

As always, my sincere gratitude in advance!!
 Bengt O. Muthen posted on Friday, May 02, 2014 - 8:52 am
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.
 S.Arunachalam posted on Friday, May 02, 2014 - 10:19 am
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?
 Bengt O. Muthen posted on Friday, May 02, 2014 - 4:18 pm
The technical appendix, Secton 13.5 says:

"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.
 S.Arunachalam posted on Friday, May 02, 2014 - 9:02 pm
Dear Prof. Muthen. Thanks a lot for your advice. My sincere gratitude to you.
 S.Arunachalam posted on Saturday, May 03, 2014 - 9:31 am
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.
 Linda K. Muthen posted on Sunday, May 04, 2014 - 4:54 pm
I don't know of any references. If the tail is long enough, you could consider a censored variable. You need to look at the variable's distribution and be guided by that. This is a research topic.
 S.Arunachalam posted on Sunday, May 04, 2014 - 8:44 pm
Thank you Prof. Muthen.
 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!
 Bengt O. Muthen posted on Thursday, May 15, 2014 - 3:52 pm
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.

COUNT=Y (nb);
CLUSTER = tchid;

X (aw);
M (bw);
X (ab);
M (bb);

NEW(indw indb);
 Linda K. Muthen posted on Friday, May 16, 2014 - 10:02 am
Please send your output and license number to support@statmodel.com.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message