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 http://journals.lww.com/epidem/pages/articleviewer.aspx?year=2014&issue=09000&article=00019&type=abstract 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!
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 LDV MOD LM TxbyLM Tx; where however LM is now a latent, but a latent change/difference score, not a multi-item scale, so it is defined like:
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!
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?
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?
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?
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).
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?
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?
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.
Tor Neilands posted on Thursday, September 20, 2018 - 9:45 am
I'm helping a colleague to fit a Cole-Maxwell type longitudinal mediation autoregressive SEM to data with 5 fixed time points. The exposure E is randomized assignment (0=control; 1=intervention), there are 3 observed mediators (1 continuous; 2 ordinal), and either a latent Y or observed Y (we haven't decided which, yet). The residuals of the mediators are pretty weakly correlated and we will use nested testing or BIC to see if we need to retain those correlations, but for now let's assume we'll retain them.
There is some interest in estimating causal direct, total, and indirect effects of X on Y through the M variables. I assume those effects are not available through MODEL INDIRECT at this time? (I would be overjoyed to be wrong about that).
If I am correct that those effects are not presently available through MODEL INDIRECT, could the MODEL CONSTRAINT examples of your 2011 paper be applied directly here? Or would more complex expressions be required due to the presence of the multiple mediators, correlated mediator residuals, and various autoregressive pathways?
If not, I suppose we could use WLSMV or Bayes (I imagine Bayes would be better due to some data missing due to loss to follow-up) to estimate the traditional non-causal indirect effects of X on Y through M* as long as we can demonstrate no X-M interactions on Y.
Counterfactually-defined effects would be needed only if it is important to treat the 2 ordinal mediators as ordinal (as opposed to continuous). My writing does not cover the case of multiple mediators where some are ordinal.
E is not repeated. It is randomization assignment/study arm assignment (0 = control; 1 = intervention). I suppose I should've called it X for consistency with the way such variables are described in the Mplus documentation and related literature.
M and Y are repeated 5 times.
By the way, I really enjoyed your 13-minute video on mediation linked from the Mplus home page this week. I found it very relevant to several applied data analyses I'm helping early-career scholars with presently. One comment you made in the video that I found especially interesting was your remark that there may be benefits to including X-M interactions and using the causal effects framework even if the X-M interaction is not statistically significant. Could you elaborate further on why that's the case? I found that statement to be very interesting and was hoping to learn more. Thanks!
The idea of including an X-M interaction comes from the 2015 VanderWeele book, page 46. He points to the low power to detect the XM effect and suggests checking for the need to include it by seeing if the indirect and direct effect estimates change much.
There has been several recent articles (MBR, Psych Meth?) on longitudinal mediation in addition to Maxwell's 2010, 2011 articles. See for instance
Adam Garber posted on Wednesday, March 13, 2019 - 9:20 pm
I would like to run a casual effects model including the MX interaction (i.e. case 3 from the Mplus mediation book) but with 3 continuous mediators. Therefore, the model would include the following variables: x (binary), m1, m2, m3, y, mx1, mx2, mx3, & c(continuous covariate)
To my knowledge it is not possible to use the MODEL INDIRECT (y mod m mx x) command with multiple mediators. I am aware of the relevant input example from your Muthen(2011) paper but am unable to translate this input (table 25) from the simulation to the data context.
Could you direct me to an example input to run a model which estimates the four causal effects (TNIE,PNIE,TNDE,PNDE) which could be extended to the case of multiple mediators?