Message/Author 


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 


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 support@statmodel.com and we will see what it is and if there is a way around it. 


Hello 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 THIS MODEL CAN BE DONE ONLY WITH MONTECARLO INTEGRATION. Does this make any sense? Thank you in advance for any advice. 


This sounds like a situation where sending your input, data, output, and license number to support@statmodel.com is needed. 


Dear all, I ran into the very same situation. Is there a solution to it? Thank you. 


I'm not clear what the situation is. Can you briefly describe it? 


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? Thanks! Christian 


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 biascorrected 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. 


You can define the indirect effects using MODEL CONSTRAINT and obtain standard errors and confidence intervals. 


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. 


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. 


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. 


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); swh=p3*p1; swp=p3*p2; Intead of MODEL INDIRECT: 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? 


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 support@statmodel.com. 


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! 


Q1. Yes Q2. Yes, if you use the default ML logit link Q3. Bootstraps are available but not CIs with imputation. 


Hello, 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! 


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. 


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. 


See Example 5.20. 


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. 


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. Reference: Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus. 


It seems that you would use the formulas for a binary outcome (logit link), considering one category at a time. 


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! 


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. 


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! 


We need to see your output(s) to say  please send to Support along with your license number. 


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! ANALYSIS: TYPE=COMPLEX; ESTIMATOR=MLR; MODEL: Y ON m x1 x2 x3; m ON x1 x2 x3; y ON m (b1); y ON x1 (cdash1); m ON x1 (a1); MODEL CONSTRAINT: 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 ANALYSIS: TYPE=COMPLEX; MODEL: Y ON m x1 x2 x3; m ON x1 x2 x3; MODEL INDIRECT: Y IND x1; 


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 counterfactuallydefined effects as discussed in the papers on our page at http://www.statmodel.com/Mediation.shtml and in chapter 8 of our new book at http://www.statmodel.com/Mplus_Book.shtml 

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 withinlevel 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? 


Please send the relevant output files along with the data to Support and include your license number. 


Hello, 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 datasets available, and if not what else can I do? Many thanks, Angeliki 


Bootstrapping on imputed data sets is available. Use for example user's guide example 11.6 and add bootstrap=10 in the analysis command. 


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 xvariables. These cases were not included in the analysis. Number of cases with missing on all variables except xvariables: 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. 


This the relevant part of my input: DATA IMPUTATION: IMPUTE = SELF_E17 DAS CSQ_T CSQ_STAB CSQ_SELF CSQ_GLOB CSQ_INT FAM1 FAM2 FAM3 FAM4 DEP18 SEX (c) MAT_OCCU (c) MAT_EDU (c) ETHNIC (c) DEP13 SELF_E13 SELF_E8 DEP10 DEP16; NDATASETS = 5; SAVE = MI_3*.dat; ANALYSIS: TYPE = GENERAL; ESTIMATOR = ML; ITERATIONS = 10000; CONVERGENCE = 0.00005; BOOTSTRAP = 1000; BCONVERGENCE = .05; BSEED = 48932; MODEL: FAMILY BY FAM1 FAM2 FAM3 FAM4; DEP18 ON FAMILY (b1); DEP18 ON SELF_E17 (b2); DEP18 ON DAS (b3); DEP18 ON CSQ_T (b4); DEP18 ON SEX_MIN (cdash); DEP18 ON SEX MAT_OCCU MAT_EDU ETHNIC DEP13 SELF_E13; FAMILY ON SEX_MIN (a1); FAMILY ON SEX MAT_OCCU MAT_EDU ETHNIC DEP13 SELF_E13; SELF_E17 ON SEX_MIN (a2); SELF_E17 ON SEX MAT_OCCU MAT_EDU ETHNIC DEP13 SELF_E13; DAS ON SEX_MIN (a3); DAS ON SEX MAT_OCCU MAT_EDU ETHNIC DEP13 SELF_E13; CSQ_T ON SEX_MIN (a4); CSQ_T ON SEX MAT_OCCU MAT_EDU ETHNIC DEP13 SELF_E13; MODEL CONSTRAINT: 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; OUTPUT: TECH8; STAND CINT (bootstrap); 


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 pvalues are the result of bootstrapping or another test (e.g. sobel)? If they are bootstrapping, how can I obtain the confidence intervals? 


The pvalues are the normal theory based pvalues 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 