MODEL INDIRECT not available with mul... PreviousNext
Mplus Discussion > Missing Data Modeling >
 Kai Arzheimer posted on Friday, June 03, 2005 - 12:32 am
Dear all,
I'm trying to estimate a rather complex path model with a lot of variables. Since listwise deletion would remove too many cases, I have created five imputed data sets and have specified TYPE IS IMPUTATION. Unfortunately, MPlus 3.12 now tells me that MODEL INDIRECT (which is essential for my research question) is not longer available. Is there any way around this restriction?
Thanks, Kai
 Linda K. Muthen posted on Friday, June 03, 2005 - 6:46 am
I don't think the problem is with the IMPUTATION option. There are some analyses for which MODEL INDIRECT is not available. This is described in the user's guide. If you want to know why you are unable to get MODEL INDIRECT, please send you output and license number to and we will see what it is and if there is a way around it.
 melissa walls posted on Tuesday, April 18, 2006 - 11:10 am
I am estimating a simple path model that has several control variables, 2 mediating variables, and a dependent variable that is dichotomous.

I want to estimate missing data for this model using maximum likelihood, but I would also like to estimate indirect effects; however, it appears that this is not allowed because using ML results in logistics coefficients (where indirect effects cannot be calculated). Am I correct on this?

In order to go ahead and try to estimate the missing data, I removed the 'model indirect' commands from my program:

1. when i use the type=missing statement the program still outputs WLSMV estimates, and the missing data is not estimated (listwise deletion) How could this be?
2. I included estimator=ml in my command to try to bypass this, but got the following message:*** FATAL ERROR
Does this make any sense?

Thank you in advance for any advice.
 Linda K. Muthen posted on Tuesday, April 18, 2006 - 11:28 am
This sounds like a situation where sending your input, data, output, and license number to is needed.
 Shang-en Chung posted on Tuesday, February 10, 2009 - 3:19 pm
Dear all,

I ran into the very same situation. Is there a solution to it?

Thank you.
 Linda K. Muthen posted on Tuesday, February 10, 2009 - 6:06 pm
I'm not clear what the situation is. Can you briefly describe it?
 Christian S. Chan posted on Thursday, July 02, 2009 - 8:27 pm
Hi Drs. Muthen,
My question is similar to the other posts:
I've been trying to estimate indirect effects with a dataset with some missing variables.
Is it possible to do bootstrapping with multiple imputed datasets? If not, is there a way to do bootstrapping with sufficient statistics?
How would you recommending testing indirect effects with missing data, if the two above methods are not feasible?
 Linda K. Muthen posted on Friday, July 03, 2009 - 9:28 am
With multiple imputation, you can fix all parameters at the average value given in the imputation run and them run the analysis with MODEL INDIRECT using one of the imputation data sets and no IMPUTATION. It does not matter which data set because nothing is estimated.
 Antti Kärnä posted on Friday, February 12, 2010 - 10:11 am
Dear Drs. Muthen,
I have a dataset (N=234) with some missing values and I want to investigate indirect effects with Mplus (with 5 datasets from multiple imputation). Would the following be a sound solution:
First estimate a model with TYPE=IMPUTATION without MODEL INDIRECT to examine the model fit and some estimates.
Next, run the same model separately with each imputed dataset with MODEL INDIRECT and without TYPE=IMPUTATION. Combine the estimates for the indirect effects with Rubin's rules.
In addition, I would like to have the bias-corrected bootstrapped CIs. Would it be defensible to calculate the CIs as averages over the lower and upper bounds from the analyses of single imputed datasets? Thanks in advance.
 Linda K. Muthen posted on Friday, February 12, 2010 - 10:24 am
You can define the indirect effects using MODEL CONSTRAINT and obtain standard errors and confidence intervals.
 Artur Pokropek posted on Monday, August 09, 2010 - 4:44 am
Dear Drs. Muthen,
I’ve also want to obtain indirect effects with multiple imputation (this is path analysis and I’ve used also brr standard error estimation). I was following your advice from the post above „fix all parameters at the average value given in the imputation run and them run the analysis with MODEL INDIRECT using one of the imputation data sets” and I’ve run model. The only problem with this approach is that I’ve got no standard errors. Will it be good approach to obtain standard errors running model 5 times (each for each mi data set) and using Rubin’s rule to compute estimates and SE instead of fixing All parameters at the average value given in the imputation.
By the way I’ve notice that estimates produced by plus using option impute are slightly different than Simple average from 5 analysis conducted for each mi datasets. What might be the source of that? Thanks in advance.
 Linda K. Muthen posted on Monday, August 09, 2010 - 8:55 am
I would use MODEL CONSTRAINT to define the indirect effects not do it for each data set separately.

The parameter estimates given with TYPE=IMPUTATION are the average over the set of imputed data sets. Perhaps Mplus uses more precision that you can do with only three decimals.
 Artur Pokropek posted on Tuesday, August 10, 2010 - 4:25 am
Thank You,
I see that MODEL CONSTRAINT may by convenient way to do. But could You tell weather combining results from each data set using Rubin’s rule is not valid approach (indirect estimates behave different?) or this is only less convenient way to do the same thing.
 Artur Pokropek posted on Tuesday, August 10, 2010 - 5:22 am
Sorry to bother you once again. But i fund something strange using MODEL CONSTRAINT approach. I was trying to check solutions comparing MODEL CONSTRAINT and MODEL INDERECT. I use only one of my data set, so there were no multiple imputations.
Following your advice I’ve used:

Model Constraint:
NEW(swh swp);

Intead of

science ind wealth hisei;
science ind wealth pared;

I’ve run the model. Estimates are the same but standard errors differ. Those are from MODEL CONSTRAINT

New/Additional Parameters
SWH -0.101 0.202 -0.498 0.618
SWP -0.793 1.610 -0.493 0.622

And Those from MODEL INDIRECT:

Effects from HISEI to SCIENCE
Sum of indirect -0.101 0.021 -4.706 0.000
Effects from PARED to SCIENCE
Sum of indirect -0.793 0.172 -4.623 0.000

What may be the source of this difference?
 Linda K. Muthen posted on Tuesday, August 10, 2010 - 10:00 am
Using the Rubin rule is a valid approach. It is not as convenient to do.

Please send the two full outputs as attachments and your license number to
 frédéric N. Brière posted on Thursday, March 10, 2011 - 3:21 pm
Dear Drs Muthen,
I have a similar problem with indirect effects and imputation in a path model with binary and continuous variables. I have read several topics, but I still am not totally clear on what to do. I'm tented to specify indirect and total effects using Model Constraint, as suggested.

categorical are u;
u on med (p1)
pred (p3);
med on pred (P2);

model constraint:
new (pind ptot);
pind = p1 * p2;
ptot = pind + p3;

Q1. Is the multiplication of coeffs correct with both ML estimation and WLSMV given that the mediator is continuous and the outcome binary?

Q2. Using ML, could the unstandardized indirect effects be transformed and presented as odd ratios?

Q3. I'd like to use bootstrapping + CIs, but I'm just able to get boostrapping (using WLSMV). Is there a way to get both with type = imputation?

Thanks in advance!
 Bengt O. Muthen posted on Thursday, March 10, 2011 - 6:21 pm
Q1. Yes

Q2. Yes, if you use the default ML logit link

Q3. Bootstraps are available but not CIs with imputation.
 Melissa Falkenstern posted on Monday, February 27, 2012 - 6:52 pm

I've used the MODEL CONSTRAINT to calculate the indirect effects with imputed data sets, but I've been unable to get the STDYX output for this part (i.e., it will give me the model parameters in the STDYX, but not the indirect effects calculated in MODEL CONSTRAINT). Is there additional code that would provide me with the indirect effects using the STDYX output? Thanks in advance for your help!
 Linda K. Muthen posted on Wednesday, February 29, 2012 - 6:13 pm
Standardized values are not given for the new parameters in MODEL CONSTRAINT. You would need to use MODEL CONSTRAINT to define the STANDARDIZED coefficients and would then get standard errors for them.
 Melissa Falkenstern posted on Friday, March 02, 2012 - 1:02 pm
Thanks for your fast reply! I'm not sure how to define STANDARDIZED coefficients in MODEL CONSTRAINT. Could you point me toward some resources that might guide me in creating the code? Thanks again for your help.
 Linda K. Muthen posted on Friday, March 02, 2012 - 4:30 pm
See Example 5.20.
 Ming-Hong Tsai posted on Monday, June 30, 2014 - 3:33 am
Dear Drs. Muthen,

I recently bought your Mplus and am still trying to figured out how to run models.

I need your help with one question regarding indirect effects and missing values.

I want to run a moderated mediation model (one IV, one Mediator, and one DV, one moderator that affects the relationship between the IV and the mediator).

My DV has some missing values and I do not want to remove the data points with missing values. I went through the examples of path analysis and regression but I cannot find appropriate codes to estimate the indirect effects with missing values.

Could you please give me some advice? Thank you in advance for your help.
 Linda K. Muthen posted on Monday, June 30, 2014 - 10:18 am
The default in Mplus is to estimate the model using missing data theory. You don't need to do anything special.
 Violet Xu posted on Sunday, February 22, 2015 - 9:09 am
Dear Dr. Muthen,

I have a mediation model with a nominal outcome. I would like to treat the nominal outcome as latent classes. The independent and mediator variables are continuous. In this case, do the formula in any section of Muthén (2011) apply? Thank you.


Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus.
 Bengt O. Muthen posted on Sunday, February 22, 2015 - 1:55 pm
It seems that you would use the formulas for a binary outcome (logit link), considering one category at a time.
 Gargi Sawhney posted on Thursday, February 04, 2016 - 4:03 pm
I have a question regarding the Model Indirect command. I have a mediation model (X -> M -> Y). To test my partial mediation hypothesis, I have performed the following tests:

Model 1: y on x;
Model 2: y on m; m on x;
Model 3: y on m x; m on x;

First, to test indirect effects, (i.e., effect of x on y through m), should I include it in the model command, or just in the model indirect command? Also, if the fit of my model decreases when I include the partial mediation link, but the indirect effect is significant, what would that imply? Thank you for your assistance!
 Linda K. Muthen posted on Friday, February 05, 2016 - 6:35 am
You must specify y ON m and m ON x in the MODEL command if you want to get the indirect effect using MODEL INDIRECT.
 Daphne Vrantsidis posted on Friday, February 19, 2016 - 5:19 pm
Dear Drs. Muthen,
I’m trying to estimate indirect effects with multiple imputed datasets. I fixed all parameters at the average value given in the imputation run and then ran the analysis with the MODEL INDIRECT using one of the imputation data sets and no imputation. However, the beta coefficients from the analysis with the model indirect command are not the same as the coefficients from the imputation run. How can I fix this? Thank you for your assistance!
 Bengt O. Muthen posted on Friday, February 19, 2016 - 6:23 pm
We need to see your output(s) to say - please send to Support along with your license number.
 Krysten Bold posted on Monday, August 15, 2016 - 1:23 pm
I am running a mediation model TYPE=COMPLEX to allow for clustering, with a binary Y. I am confused as to why my estimates of the indirect effect vary based on whether I use MLR and model constraint commands vs. WLSMV and model indirect commands (syntax below). Can you please clarify why these model estimates and indirect estimates would differ? The model and covariates are otherwise identical and there are no missing data.

Thank you in advance!


Y ON m x1 x2 x3;
m ON x1 x2 x3;

y ON m (b1);
y ON x1 (cdash1);
m ON x1 (a1);

NEW (a1b1 ORa1b1 ORc1);
a1b1=a1*b1; ! indirect effect of x1 on y via m
ORa1b1=exp(a1*b1); ! OR indirect effect x1 on y via m
ORc1=exp(cdash1); ! OR direct effect x1 on y

Y ON m x1 x2 x3;
m ON x1 x2 x3;

Y IND x1;
 Bengt O. Muthen posted on Monday, August 15, 2016 - 3:50 pm
I assume your full input has

Categorical = y;

In this case, MLR defaults to logit and WLSMV uses probit. This makes for different estimates. Also, with probit, you cannot compute OR = exp...

Further more, with a binary DV you should use the counterfactually-defined effects as discussed in the papers on our page at

and in chapter 8 of our new book at
 Jinxin ZHU posted on Sunday, June 11, 2017 - 9:13 pm
Dear Prof. Muthens,

I am now using Mplus V8, for twolevel path anlysis with plausible values using the option of "Type=Imputation" and "Model Indirect".

This worked for one of my analysis but did not work for another one, which just stopped after processing to the second data set, without any warning message in the output file but just stop at:

"SEM model 1 ;"(the title of my model)

I tried to keep only one dataset in the dataset list and it worked well. But when the number of dataset is more than one, the problem mentioned above appeared.
Of course it also worked well when I drop all the syntax related to "Model Indirect". I also found that the problem only happen when there was a request indicating a total indirect effect from a within-level independent variable to a dependent variable across two levels, such:

Achie Ind gender;

where Achie is a variable across within and between level, while gender is a within level variable

Would you please kindly help?
 Bengt O. Muthen posted on Monday, June 12, 2017 - 6:12 pm
Please send the relevant output files along with the data to Support and include your license number.
 Angeliki Argyriou posted on Friday, February 16, 2018 - 5:16 am

I used multiple imputation as I have a lot of missing data in a longitudinal dataset. I now tried to implement a multiple parallel mediation model, which has worked on the imputed datasets but I can't get bootstrapping to work. Is bootstrapping on imputed data-sets available, and if not what else can I do?

Many thanks,
 Tihomir Asparouhov posted on Friday, February 16, 2018 - 3:58 pm
Bootstrapping on imputed data sets is available. Use for example user's guide example 11.6 and add bootstrap=10 in the analysis command.
 Angeliki Argyriou posted on Sunday, February 18, 2018 - 2:49 pm
Dear Dr Asparouhov

Thank you for your response. I tried what you suggested but I ran into the following problems:

1) It still doesn't allow for bootstrap confidence intervals if I put STAND CINT (bootstrap) in the output command.

2) It also does now allow for the Model Indirect command. Without this or the bcbootstrap output how can I get the estimates for my indirect effects?

3) It gives me a different sample size than before with the output giving me the following warning:
*** WARNING Data set contains cases with missing on all variables except x-variables. These cases were not included in the analysis. Number of cases with missing on all variables except x-variables: 69
This did not happen when I did MI on the same sample and then as a separate analysis I ran the mediation on the imputed dataset list.
 Angeliki Argyriou posted on Sunday, February 18, 2018 - 2:55 pm
This the relevant part of my input:

SAVE = MI_3*.dat;

CONVERGENCE = 0.00005;
BSEED = 48932;

DEP18 ON SELF_E17 (b2);
DEP18 ON DAS (b3);
DEP18 ON CSQ_T (b4);
DEP18 ON SEX_MIN (cdash);

NEW(a1b1 a2b2 a3b3 a4b4 TOTALIND TOTAL);
a1b1 = a1*b1;
a2b2 = a2*b2;
a3b3 = a3*b3;
a4b4 = a4*b4;
TOTALIND = a1*b1 + a2*b2 + a3*b3 + a4*b4;

STAND CINT (bootstrap);
 Angeliki Argyriou posted on Sunday, February 18, 2018 - 3:47 pm
Just to clarify the above: The output does give me estimates of the indirect effects BUT it doesn't give me confidence intervals and it gives me the following WARNING message:

*** WARNING in OUTPUT command
BOOTSTRAP and BCBOOTSTRAP confidence intervals are not allowed with DATA IMPUTATION. Request for CINTERVAL is ignored.

Given this warning I was unsure whether the p-values are the result of bootstrapping or another test (e.g. sobel)? If they are bootstrapping, how can I obtain the confidence intervals?
 Tihomir Asparouhov posted on Tuesday, February 20, 2018 - 1:39 pm
The p-values are the normal theory based p-values 2*Phi^{-1}(-P/SE)

You can ether use the symmetric confidence intervals +-1.96SE or with some more work combine the bootstrap distributions (from plots) from the different imputed data sets and get the confidence interval from the combined distribution.
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