Causal mediation PreviousNext
Mplus Discussion > Structural Equation Modeling >
 Emil Coman posted on Tuesday, January 13, 2015 - 1:50 pm
I am running the new 'causal mediation' command, using something like
DV MOD M TxbyM Tx;
However I would like to generate a new parameter besides the four listed in the output (PNDE, TNIE, TNDE, PNIE), based on VanderWeele's paper
I would want specifically to estimate TNDE-PNDE=IntRef as a new parameter.
How could I do this, what labels does Mplus use by default for PNDE, TNIE, TNDE & PNIE behind our backs (if so), that I could use to generate IntRef?
I would not want of course to calculate & labeled by hand TNDE and PNDE themselves as new parameters only to have them labeled... Thanks!
 Bengt O. Muthen posted on Tuesday, January 13, 2015 - 2:02 pm
Sorry, the PNDE etc quantities are not accessible but all have to be expressed as in my 2011 paper.
 Emil Coman posted on Wednesday, January 14, 2015 - 8:34 am
Thanks, Bengt; 1 more quick one: can you see a way to run causal mediation like a
where however LM is now a latent, but a latent change/difference score, not a multi-item scale, so it is defined like:

LM by wave2M@1;
wave2M on wave1M@1;
wave2M on LM@1;
LM on wave1M *; !a good way to define LCS scores

My problem of course is I cannot include a TxbyLM in the DEFINE section, as the LM latent is defined below that... The only (bad!) workaround I see is to compute mere difference score in DEFINE as DifM=(wave2M -wave1M) and then compute a TxbyM =DifM*Tx. Any suggestion/comment? Thanks!
 Tihomir Asparouhov posted on Wednesday, January 14, 2015 - 12:12 pm
You can define that interaction in the model statement using


and add type=random in the analysis command.
 Emil Coman posted on Wednesday, January 14, 2015 - 1:12 pm
Thanks, Tihomir, I found this option mentioned here in the listserv, and tried it... it gets to:
"*** ERROR
MODEL INDIRECT is not available for TYPE=RANDOM."
 Tihomir Asparouhov posted on Wednesday, January 14, 2015 - 3:00 pm
You have to use the 2011 paper and model constraints to get the effects you need.
 John C. posted on Monday, February 15, 2016 - 12:09 pm
I would like to implement a model with a nominal mediator, based on the discussion in section 8 of your paper, “Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus.” However, my model differs from in that the x variables are not necessarily binary.

The framework presented in Muthen (2011) is for a binary x which acts as treatment, but I’m assuming the approach is fully extendable to models where x may be continuous or, in my case, a factor?

For example, the formulation of a direct effect give in the paper is “ the conditional expectation, given the covariate, of the difference between the outcome in the treatment and control group when the mediator is held constant at the values it would obtain for the control group.”

In the case where x is continuous, what would be the analogous formulation?
 Bengt O. Muthen posted on Tuesday, February 16, 2016 - 6:36 am
Yes, you can have a continuous exposure variable. The effects are then evaluated by comparing two exposure values, for example, the mean and one SD above the mean.

I will present a paper on nominal mediation at the M3 meeting at UCONN in May.
 John C. posted on Wednesday, February 17, 2016 - 8:23 am

I have a follow up on this as it means the Mplus code examples (Tables 50 and 51) would have to be modified appropriately.

For example, as formulated:

p10 is probability of mediator category 1 when x is zero
p11 is probability of mediator category 1 when x is one

so the formulas for these would have to be modified to take account of the two exposure values.

Must the exposure values be hardcoded (in the Model Constraint section)?

Second, the x in my case is actually a factor with categorical indicators. Does this then mean that I would have to perform the analysis in two stages, i.e., first derive the factor scores, then insert the appropriate hardcoded exposure values?
 Bengt O. Muthen posted on Wednesday, February 17, 2016 - 4:35 pm
The effects in those tables is for a change from x=0 to x=1. The formulas in Table 51 are making use of these simplifications for x. If you have a continuous x you need to consider say the mean of x and 1SD above the mean of x instead of 0 and 1. That changes the formulas because those x values enter into both the gamma and the beta terms of Model Constraint in line with equations (94) and (95).

So it takes a little doing to modify the Table 51 input.
 John C. posted on Friday, February 19, 2016 - 3:16 pm
Just as a follow-up, in my case the x is a factor with ordinal indicators with values 1,2 or 3. However the continuous factor scores range from around -2.5 to +0.2. For the mediation equations above, should the mean and 1SD above the mean be in terms of the scale of the underlying factor scores?
 Bengt O. Muthen posted on Friday, February 19, 2016 - 6:20 pm
 John C. posted on Wednesday, February 24, 2016 - 9:25 am
I have a follow up question on this which may be obvious but would like to check for sure.

To proceed here I need to first generate the factor scores before I execute the fully specified model with the Model Constraint command.

I can generate the factor scores either by running the measurement model alone, or by running the fully specified model (with the measurement model as part of it).

I presume the latter is the best option to guarantee the factor scores I specify in the Model Constraint section are correct?

In that case, there should be no reason to substitute the factor scores as predictors in place of the measurement model. Is that correct?
 Bengt O. Muthen posted on Wednesday, February 24, 2016 - 3:06 pm
You don't need to estimate factor scores. You just use the model-estimated factor variance (mean is zero I assume) to give the range.
 John C. posted on Friday, February 26, 2016 - 10:47 am
I asked above if one has to specify the mean and 1 SD above the mean for the mediation equations (Tables 50 and 51) in terms of the scale of the underlying factor scores to which you indicated "Yes."

Now you're saying I don't need to estimate the factor scores. Perhaps it would be easier if you could provide the Mplus syntax for:

p10 is probability of mediator category 1 when f is at the mean
p11 is probability of mediator category 1 when f is 1 SD above the mean.
 Bengt O. Muthen posted on Friday, February 26, 2016 - 11:29 am
When you said scale of the underlying factor scores I thought you meant the scale of factor variable in the model - people often refer to it that way. I couldn't imagine that you thought you needed estimated factor scores. You should just treat the factor as an observed variable in the formulas - if it has mean zero and estimated standard deviation SD, then the 2 values are 0 and SD. You can make it easy by setting the metric of the factor as variance fixed at 1. See also Section 13.4 in the 2011 paper.
 John C. posted on Wednesday, March 02, 2016 - 5:55 am
Thanks, here is what prompted my original concern. If I look at the factor scores, the mean is -.09, and the range goes from -2.5 to .245, so highly skewed. If I add the SD (around 0.5) to the mean, I'm way out of range of any of the factor scores.

Is this a little strange, or is it still ok to just use, f*0 for the mean and f*0.5 for 1 SD above the mean (in the model constraint command).

Apologies for dragging this out.
 Bengt O. Muthen posted on Wednesday, March 02, 2016 - 6:47 pm
Yes, I would go by the metric of the factor in the model which is assume normal and gets an estimated factor SD. The model distribution is like the prior and the estimated factor scores like the posterior so they can be different.
 John C. posted on Wednesday, March 09, 2016 - 1:40 pm

Thanks, if I could shift to a different topic related to this model.

With my factor as a predictor in this mixture model I specify ALGORITHM=INTEGRATION, as indicated as required in the Mplus output

This works but then I run into a problem when modeling error correlations across the indicators. The first error is that "For covariances between categorical variables, specify PARAMETERIZATION=RESCOV in the ANALYSIS command."

However, when I add this specification, I get the following error: "Categorical variables are not allowed as factor indicators for PARAMETERIZATION=RESCOV."

In short, can these mixture models work with covariances across categorical indicators?
 Bengt O. Muthen posted on Wednesday, March 09, 2016 - 4:35 pm
You will have to put a factor behind the pair of indicators to let their residual correlate.
 Aniruddha Das posted on Tuesday, September 12, 2017 - 8:56 am
Dear Drs. Muthen,

Quick question: the user guide provides the following code for the MOD option with 4 arguments, when there’s a separate moderator that interacts with the mediator:

y MOD m z (-1 1 0.1) mz x;

where y is the outcome, m is the mediator, z is the moderator, mz is the interaction between m and z, and x is a binary exposure variable

Do the total natural indirect effects (TNIE) then incorporate x-to-y paths through:
1. m and mz, OR:
2. m, z and mz?

I.e., is the moderator z also treated as a mediator, such that the path through it is incorporated into the TNIE?

Many thanks,
Bobby Das
 Bengt O. Muthen posted on Tuesday, September 12, 2017 - 6:26 pm
The answer is: 1.

See our book at
 Lynne W posted on Wednesday, January 10, 2018 - 1:41 pm
Dear Drs. Muthen,

I want to estimate a two-level mediation model with a binary mediating variable using the Bayes estimator. I would also like to get counterfactual causal effects using the INDIRECT command, but I run into the following error: MODEL INDIRECT is not available for TYPE=TWOLEVEL with ESTIMATOR=BAYES. I tried other estimators but they also fail.

Is there a way to estimate such models or to calculate the counterfactual effects in another way?

Many thanks,
 Bengt O. Muthen posted on Wednesday, January 10, 2018 - 2:42 pm
Yes, you can always express the effects in terms of model parameters using the Model Constraint command.

I don't know if your exposure variable is a within-level or a between-level variable and which level the binary mediator is on.
 Lynne W posted on Wednesday, January 10, 2018 - 3:09 pm
My exposure variable (kkz_dens) is on the between level and the binary mediator (LPART) is on the within level.

It looks like this






L_DIFF ON kkz_dens;

LPART ON kkz_dens(B);

I assume I can calculate the conventional indirect effects using the MODEL CONSTRAINT command and the product method:




but how would I calculate the counterfactual effects?
 Bengt O. Muthen posted on Wednesday, January 10, 2018 - 4:22 pm
a*b is indeed the indirect effect. But you have to fix a couple of things in your input:

- put kkz_dens on the Between list

- add on Between:

Lpart on kkz_dens (a);

L_diff on Lpart (b);

The within-level L_diff on Lpart slope does not play into the indirect effect. See e.g. Preacher's Appendix E for "2-1-1 (MSEM)".
 Lynne W posted on Thursday, January 11, 2018 - 12:17 am
Thank you for very much for the corrections and clarifications.
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