Binary Mediators and ML PreviousNext
Mplus Discussion > Structural Equation Modeling >
Message/Author
 Jon Heron posted on Wednesday, March 28, 2012 - 1:37 am
Hi Bengt/Linda

As you know, the model indirect command can only be used with WLSMV when working with a binary mediator.

With ML, the mediator is treated as a dummy variable in it's role as an independent variable - does this mean that multiplying the paths to derive an indirect effect is invalid due to scaling and constrained residual variances?


many thanks, Jon
 Linda K. Muthen posted on Wednesday, March 28, 2012 - 10:23 am
You can also use ESTIMATOR=BAYES; MODEL CONSTRAINT; and MEDIATOR =LATENT.

The reason you can't use a product indirect effect with ML and a binary mediator is that the mediator is treated as a latent response variable when it is a dependent variable and an observed variable when it is an independent variable.
 Xu, Man posted on Thursday, March 29, 2012 - 7:19 am
I read in other threads that when logit link is used, its latent response variable that is the dependent and independent variable. Is it valid t to calculate the mediationo use the NEW in this context?
 Linda K. Muthen posted on Thursday, March 29, 2012 - 10:26 am
A product indirect effect is not valid for maximum likelihood in Mplus for the logit link or the probit link when the mediator is binary.
 Xu, Man posted on Thursday, March 29, 2012 - 10:44 am
Actually the mediator in my case would be ordinal, not binary (sorry I did not realise the centre of discussion is binary being different from ordinal here). I remember under some specification it was possible to request INDIRECT with an ordinal meditor so I just assume it would be valid to calculate the mediation with probit link.
 Xu, Man posted on Thursday, March 29, 2012 - 10:49 am
Sorry, in my previous previous post, I meant for when probit link is used, it is the latent response variable of the mediator that was used as depedent and independent, hence I thought it would be OK to calculate the product of regression coefficients in this case.
 Linda K. Muthen posted on Thursday, March 29, 2012 - 4:19 pm
An ordinal mediator is treated as a continuous variable. If you can use MODEL INDIRECT, you can compute the indirect effect as a product.
 Jon Heron posted on Monday, April 02, 2012 - 8:00 am
Hi Linda

slightly delayed thanks for your response to my initial question.

Looks like I have a few more options to play with.
 Jon Heron posted on Tuesday, April 03, 2012 - 7:42 am
Bit of an update, with no obvious questions inserted.

[1] Bayes estimation (uses probit link) and gives results similar to probit/ML when using "mediator=observed;", and results similar to probit/WLSMV when using "mediator=latent;". That's good.

[2] I had hoped I might be able to rig up some post-estimation parameters using model-constraint so that I can re-scale the logit/ML output (e.g. using David Kenny's equations: http://davidakenny.net/doc/dichmed.pdf) but I'm unable to refer to the variance of the dependent variables in the models, ditto the parameter SE's, using Mplus labelling.

Conclusion.
Logit/ML/rescaling has some benefits such as sticking with OR's which are more readily interpretable. Stata's binary-mediation function will run this automatically and also permit the use of bootstrapping, but this only works for rather simple models. Looks like I'll be sticking with probit/WLSMV in Mplus and taking the hit in terms of losing my beloved odds ratios.
 Bengt O. Muthen posted on Tuesday, April 03, 2012 - 9:17 am
I assume you are considering a binary mediator M and perhaps also a binary outcome Y.

[1] That's right.

[2] The research that the Kenny note refers to is largely outdated now. Instead you should take a look at

Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus.

which is on our web site together with Mplus scripts. This paper goes through new causal effect literature and shows how you should define indirect and direct effects with categorical and other variables. It implies that you can stay with ML-logit and odds as you desired.
 Jon Heron posted on Tuesday, April 03, 2012 - 10:38 am
Yes, just binary M for now.

Thanks for the ref :-)
 Xu, Man posted on Wednesday, April 04, 2012 - 4:29 am
Dear Linda,

My case is a more complicated situation so it would not be possible to get mediation output from MODEL INDIRECT. I test the mediation effect from an ordinal mediator with the slope and intercept of a growth curve as outcome variables.

Few things in the model that I think might be useful to present here are
TYPE=RANDOM;
INTEGRATION=MONTECARLO;
link=probit;
PARAMETERIZATION=THETA;

I think in this case latent response variable is used instead of the observed ordinal variable, so I thought maybe I could apply the simple calculation for mediation effect with MODEL CONSTRAINT. Is this valid to do?

Thank you!
 Xu, Man posted on Wednesday, April 04, 2012 - 5:07 am
Or maybe I can never calculate a valid mediation effect because estimator is mlr instead of weighted least square in this case?

I have to specify TYPE=RANDOM in order to get the model run with TSCORE option.
 Linda K. Muthen posted on Wednesday, April 04, 2012 - 1:29 pm
If you are using MLR and have an ordinal mediator that is listed on the CATEGORICAL list, you cannot create an indirect effect as a product. Instead you would need to create it according to the formulas in the following paper:

Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus.
 Ewan Carr posted on Friday, June 22, 2012 - 3:07 pm
Further to the above:

I have a two-level model, with a continuous outcome, and a binary mediator (full specification below).

I'm testing a 2-1-1 mediation pathway — a level-2 variable is mediated by a level-1 variable.

Some questions:

1) Should I list the binary mediator on the CATEGORICAL list (My guess: yes)?

2) Should/can I test the between-level indirect effect using MODEL CONSTRAINT?

3) Is MEDIATOR = LATENT the default in Mplus? Based on the above reference, it seems the best option here.

I'm using Bayesian estimation for this model.

Many thanks in advance!

Ewan
-----------------

%WITHIN%

y ON m;

%BETWEEN%

m ON x (a);
y ON m (b);
y ON x;

MODEL CONSTRAINT:

NEW(indb);
indb=a*b;
 Bengt O. Muthen posted on Friday, June 22, 2012 - 8:30 pm
Yes, Yes, and Yes.
 Ewan Carr posted on Saturday, June 23, 2012 - 3:05 am
Great, thanks for the quick response.

Ewan
--
 anonymous Z posted on Thursday, September 10, 2015 - 5:08 pm
Dear Dr . Muthen,

I have a mediation model.

X -> M -> Y

X and Y are continuous, and M is dichotomous. Following your communication with Ewan Carr on June 22, 2012, I fit the model with Bayes estimation. M was a significant mediator.

m ON x (a);
y ON m (b);
y ON x;

I have two questions:

a.How to explain “ a”? Should I follow logistic regression to create exp (a) to explain the association between X and M?

b.I used MODEL CONSTRAINT to create:
NEW(indb);
indb=a*b;

I am confused about “a*b”, because the “a” here is a log odds, which is quite different from “b”?

Thank you very much,
 Bengt O. Muthen posted on Thursday, September 10, 2015 - 6:19 pm
a. Bayes uses probit, not logit. Look at our Topic 2 handout for how to interpret a probit regression.

b. I recommend that you instead use Model Indirect where you will get effects defined from "counterfactuals" as is described in the paper on our website:

Muthén, B. & Asparouhov, T. (2015). Causal effects in mediation modeling: An introduction with applications to latent variables. Structural Equation Modeling: A Multidisciplinary Journal, 22(1), 12-23. DOI:10.1080/10705511.2014.935843
 Bengt O. Muthen posted on Thursday, September 10, 2015 - 6:21 pm
Actually, in the current version of Mplus you need to use ML to get Model Indirect, not Bayes. You then have the choice of logit or probit for the M regression. Use

Bootstrap = 1000;

in the Analysis command and

Cinterval(bootstrap);

in the Output command.
 anonymous Z posted on Friday, September 11, 2015 - 6:49 am
Hi Dr. Muthen,

Thank you so much for your prompt response.

I chose to use Bayes because some of my variables are skewed even after transformation,and my sample size is quite small.

1. Is the combination of Bayes and Model Constraint still an option to get indirect effects?

2. I also found that bootstrapping cannot be performed with Bayes. So should I just look at the confidence interval for the new created variables for indirect effects?

Thanks!
 anonymous Z posted on Friday, September 11, 2015 - 9:27 am
One followup question about mediation with Bayes estimation. Since bootstrapping cannot be performed with Bayes,what kind of method is used to test mediation? e.g., Is sobel test or other ways used by default?

In my model, the indirect effects were significant, however, the direct effect of X on Y was NOT significant.

Thanks so much!
 Linda K. Muthen posted on Friday, September 11, 2015 - 11:41 am
1. Yes.
2 and follow up. Bootstrap is not needed with Bayes. Bayes provides non-symmetric credibility intervals.
 anonymous Z posted on Friday, September 11, 2015 - 12:20 pm
Thank you so much!
 anonymous Z posted on Tuesday, September 15, 2015 - 9:44 am
Drs. Muthen,

With Bayes estimation, what option is available for the estimation of models with missing data? i.e, how missing data are dealt with?

Thanks!
 Bengt O. Muthen posted on Tuesday, September 15, 2015 - 1:19 pm
Like ML, Bayes is a full-information estimator so it gets consistent estimates under MAR. ML and Bayes therefore give similar results with missing, where the estimates get closer with increasing sample size. Bayes is actually more flexible than ML because it avoids time-consuming numerical integration that is required for some models. Bayes also offers multiple imputation.
 anonymous Z posted on Tuesday, September 15, 2015 - 1:37 pm
Thanks so much! Dr. Muthen!
 anonymous Z posted on Friday, September 18, 2015 - 9:27 am
Hi Drs. Muthen,

With Bayes estimation, how to do the comparison between nested models?

Thanks,
 Bengt O. Muthen posted on Friday, September 18, 2015 - 5:56 pm
For many types of models we give DIC and BIC for Bayes - and more models will have these in the forthcoming version 7.4.
 anonymous Z posted on Tuesday, September 22, 2015 - 9:11 am
Hi Dr. Muthen,

Thank you very much for your reply. I just found that with a dichotomous mediator, Mplus does not give DIC and BIC for Bayes. I wonder if I need to include any extra commands in this case in order to get DIC and BIC.

Thanks,
 Linda K. Muthen posted on Tuesday, September 22, 2015 - 12:11 pm
If DIC and BIC do not come out automatically, they are not available. There is no option to ask for them.
 Lauren Hartsough posted on Friday, March 18, 2016 - 8:17 pm
I have x1(cont)->m(bi)->y(cont) with a categorical mod(4 levels). My goal is mod-med with indirect effects/bootstrap CIs for each level.
NAMES ARE x1 x2 m y;
USEVARIABLES x1 x2 m y;
CATEGORICAL are m;
GROUPING is x2 (1=1,2=2,3=3,4=4);
ANALYSIS:
bootstrap = 100;
MODEL:
m on x1; y on m x1;
Model 1:
m on x1; y on m x1;
MODEL INDIRECT: y via m x1(a1);
Model 2:
m on x1; y on m x1;
MODEL INDIRECT: y via m x1(a2);
Model 3:
m on x1; y on m x1;
MODEL INDIRECT: y via m x1(a3);
Model 4:
m on x1; y on m x1;
MODEL INDIRECT: y via m x1(a4);
OUTPUT:
cinterval(bcbootstrap);
MODEL TEST:
0 = a1-a2;
0 = a1-a3;
0 = a1-a4;
0 = a2-a3;
0 = a2-a3;
0 = a3-a4;

1. I get MODEL TEST error saying a1 is not found (bootstrap removed)
2. Defaults run probit WLSMV; does this automatically calculate indirect effects using the counterfactual method as in Muthén,(2011)?
3. When I run ML for probit or logit I no longer get indirect effects. I was hoping to use logit to get odds ratios. How can I use MODEL CONSTRAINT to use logit/ML? I've looked through examples but can't get it
4. Should I standardize variables for mplus model?
 Bengt O. Muthen posted on Saturday, March 19, 2016 - 4:19 pm
1.You can't put parameter labels in Model Indirect. They should be in the Model command.

2. No, use ML or Bayes.

3. You don't get counterfactually-defined causal effects when saying VIA. Use IND and mention the mediator - see UG on our website, pages 702 -

4. No.
 Lauren Hartsough posted on Saturday, March 19, 2016 - 9:05 pm
Thank you.
NAMES ARE x1 x2 m y;
USEVARIABLES x1 x2 m y;
CATEGORICAL are m;
CLASSES are cg(4);
KNOWNCLASS is cg(x2=1-4);
ANALYSIS:
TYPE = MIXTURE;
bootstrap = 100;
ESTIMATOR = ML;
LINK = LOGIT;
MODEL:
m on x1; y on m x1;
MODEL INDIRECT: y IND m x1(1 2);
Model 1:
m on x1; y on m x1;
MODEL INDIRECT: y IND m x1(1 2);
Model 2:
m on x1; y on m x1;
MODEL INDIRECT: y IND m x1(1 2);
OUTPUT:
cinterval(bcbootstrap);
1. Does this give counterfactually-defined causal effects correctly using IND?
2. I don't understand how my continuous x1 variable is interpreted to calculate the causal effects. Is this only using values 1 and 2? (1 2)
3. I get error Unknown class model name 1 specified in C-specific MODEL command when I try to compare by group x2
 Bengt O. Muthen posted on Sunday, March 20, 2016 - 6:49 am
Please send your output to Support along with your license number.

Page 703 of the UG on our website mentions how the x values in parentheses are used. You consider a change from the second value to the first. Typically they are chosen as 1 SD above the mean versus the mean.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: