Message/Author 

nina chien posted on Wednesday, May 28, 2008  4:22 pm



Hi, I'm getting this error message: "MODEL INDIRECT is not available for analysis with ALGORITHM=INTEGRATION" The thing is, I have not specified ALGORITHM=INTEGRATION. I am running a structural equation model with predictors, mediators, and outcomes. I am using the model indirect command. The model runs when I do not specify that two of my mediators are categorical. When I put in the "categorical are" command, I get this error message. Thank you for your help. Nina 


It sounds like ALGORITHM=INTEGRATION is required for your analysis. If you want further information, please send your input, data, output, and license number to support@statmodel.com. 

Ken posted on Monday, June 09, 2008  9:00 pm



I have a similar problem, and integration is definitely required due to the categorical variables. Using WLS avoids the problems but my parameter estimates are very different, which I will have trouble explaining. It's not unexpected it is a fairly different algorithm. My thought is that for obtaining the indirect estimates then parametric bootstrapping would fix the problem, but this isn't available in Mplus either. One option seems to be to create my own simulated datasets and then run Mplus on these and calculate the bootstrap standard errors. Is there an easier or better way ? 


Weighted least squares provides probit regression coefficient. Maximum likelihood provides logistic regression coefficients. You should be comparing column three of the output, the ratio of parameter estimates to standard errors. You can use MODEL CONSTRAINT to define indirect effects. 

Vlad posted on Friday, October 09, 2009  6:33 am



Hello, I am estimating the model with the latent classes and each class is allowed to have different parameters in equations. From mplus I receive the following message "Some statements are only supported by ALGORITHM=INTEGRATION". Once I specify ALGORITHM=INTEGRATION, the program is running. But it says: the dimension of integration is zero and the total number of integration is one. Basically, the there is no integration. So, why do I need this integration? And, What is it does in my case? P.S: some of my variables are categorical and once I remove the command “categorical” the program runs but it doesn’t make sense any more. Regards, Vlad 


Sometimes it is difficult to determine if integration is required and the integration track is used even when there are no dimensions of integration. This does not affect your results in any way. 


Dear Linda and Bengt, I am trying to run a continuoustime survival analysis using the Cox regression model and I also want to test indirect effects whitin this model. However, since survival analyses need algorithm=integration, the model does not run with indirect effects. Is there a way to test indirect effects when using continuoustime survival analysis using the Cox regression? What do I need to do if this is possible? Thanks in advance!! 


What is the scale of your mediator variable? What is the scale of the final variable in the indirect effect? 


Dear Linda, Thank you for reply. I would like to test two mediation paths. Both mediators have continuous scales. The final variable is dichotomous (no/yes). I also tried to specify indirect effects with the contraint command, however than Mplus comes with a fatal error that montecarlo integration is needed for the analyses (?). Also, when I do not specify any mediation paths, Mplus still gives me a fatal error montecarlo integration is needed (I guess this error is related to the scales of the mediators?). Is there anything else we can do? Hope you can help. 


You can use MODEL CONSTRAINT to estimate those indirect effects. Add INTEGRATION=MONTECARLO; to the ANALYSIS command. You must have missing data on the mediators. 


Dear Linda, Thanks again for your reply. I indeed have missings within the mediators, however, I thought FIML would take care of it. Does FIML not work when using these kind of analyses? Would missing imputation be a better idea and afterwards try to run the model again with MODEL CONTRAINT to estimate indirect effects and INTEGRATION=MONTECARLO? Or is INTEGRATION=MONTECARLO not necesarry when the missing data is imputed? Or would it be easier to run the model in two steps, and than calculate the mediation effect by hand using a Sobel test? 


If your model requires numerical integration and you have missing data on the mediators, Monte Carlo integration is required. This does not mean FIML is not being used. If you want to use imputed data instead, that is an alternative. I do not see a need for this. Running a model in two steps is never a good idea if it can be done in one step. 


Hi Linda, Thank you for the advice. 


Dear Drs Muthen I am trying to run a mediation analysis and am getting this error message  "MODEL INDIRECT is not available for analysis with ALGORITHM=INTEGRATION" My model has one predictor, 4 mediators and a categorial outcome variable and I am using the model indirect command. I'm just not sure what to do next and would be grateful for any advice. Many thanks, Jaclyn 


What is the metric of your mediators? 


The mediators are all continuous variables. Many thanks, Jaclyn 


I should have mentioned that the predictor variable is also categorical (3 categories) and has been recoded into 2 dummy variables. Many thanks, Jaclyn 


You can use MODEL CONSTRAINT to create the indirect effects in this case. For further information see on the website: Muthén, B. (2011). Applications of causally defined direct and indirect effects in mediation analysis using SEM in Mplus. 


Dear Dr Muthen, Apologies for coming back to you again. I am quite new to this and seem to run into difficulties as my outcome variable is categorical. I have done as you suggested but I am now getting the following error: FATAL ERROR THIS MODEL CAN BE DONE ONLY WITH MONTECARLO INTEGRATION. I am not sure how to proceed and would be grateful for any advice. Many thanks, Jaclyn 


You need to add INTEGRATION=MONTECARLO; to the ANALYSIS command. You must have missing data on a mediator. In this case, Monte Carlo integration is required. 


Can this option be used for TYPE=COMPLEX? My data is clustered within schools and I am now getting the following error: ERROR in ANALYSIS command Unrecognized setting for TYPE option: INTEGRATION=MONTECARLO Many thanks, Jaclyn 


Please send your output and license number to support@statmodel.com. 


Dear Dr Muthen, Apologies for coming back to you again about this. The more I read about the topic, the more I am unsure what I am doing is correct. Could you tell me is it possible to include a multiple mediation effect in a multinomial logistic regression? I have a categorical (6 categories) outcome variable and four mediators (all continuous) and a continuous x variable. I can find many references on mediation with binary outcome variables but not multinomial outcomes. Many thanks, Jaclyn 


I have not seen a thorough statistical treatment of indirect effects when the Y variable is nominal (unordered categorical) using multinomial logistic regression. I would recommend simplifying to working with one binary Y at a time, where the binary outcome is formed as one category versus all the others. 


Dear Dr. Muthen, Thank you for your response. I have now rerun my analysis using a binary outcome variable as suggested. But now I am getting this error: WARNING: THE LATENT VARIABLE COVARIANCE MATRIX (PSI) IS NOT POSITIVE DEFINITE. THIS COULD INDICATE A NEGATIVE VARIANCE/RESIDUAL VARIANCE FOR A LATENT VARIABLE, A CORRELATION GREATER OR EQUAL TO ONE BETWEEN TWO LATENT VARIABLES, OR A LINEAR DEPENDENCY AMONG MORE THAN TWO LATENT VARIABLES. CHECK THE TECH4 OUTPUT FOR MORE INFORMATION. PROBLEM INVOLVING VARIABLE CLASS. I have checked TECH4 output but I am not sure what the problem is. I'm quite new to this but is there anything you can suggest to solve this? Thanks, Jaclyn 


Please send your output and license number to support@statmodel.com. 


Hi, I`m running a structural equation model with one predictor, two mediators, eight covariates, and one continuous outcome. I am using the model indirect command and "TYPE = COMPLEX". This is the input: usevariables = mann Hisei d_MSA d_GYM ej_m_allg ej_d_allg hs_d MH_d2 sexmh_w l2_1 l2_2 I2_4_r isei_BW beruf2_d ; cluster = schule; MISSING ARE ALL (999); categorical = beruf2_d; ANALYSIS: TYPE = COMPLEX; ESTIMATOR IS MLR; ITERATIONS = 10000; CONVERGENCE = 0.00005; MODEL: Intent by l2_2 l2_1 I2_4_r; Intent ON MH_d2 mann sexmh_w Hisei d_MSA d_GYM ej_m_allg ej_d_allg hs_d isei_BW beruf2_d ; isei_BW ON MH_d2 mann sexmh_w Hisei d_MSA d_GYM ej_m_allg ej_d_allg hs_d ; beruf2_d ON MH_d2 mann sexmh_w Hisei d_MSA d_GYM ej_m_allg ej_d_allg hs_d ; beruf2_d WITH isei_BW; model indirect: Intent ind MH_d2; The model runs when I do not specify that one of my mediators is categorical. When I declare this variable to be "categorical" as shown in the input, I get this error message: "MODEL INDIRECT is not available for analysis with ALGORITHM=INTEGRATION" Is there anything you can suggest? Thank you for your help! Sue 


You are using maximum likelihood and numerical integration is required for categorical dependent variables. You can use MODEL CONSTRAINT to define your indirect effects. 

Jenny L. posted on Friday, May 10, 2013  10:00 pm



Dear Professors, I got the error message "MODEL INDIRECT is not available for analysis with ALGORITHM=INTEGRATION" for my path analysis model. I had 3 mediators, one of which was a count; the other two were continuous variables. The outcome variable was also continuous. I didn't have ALGORITHM=INTEGRATION in my input. I should also mention that the count data included decimals because they were average counts of several coders. Would that be a problem? Could you tell me how I should address the error message? Thank you for your help. 


The default for a count variable is maximum likelihood using numerical integration. You cannot treat the sum of a set of count variables as a count variable. If you remove the COUNT option and treat the variable as continuous or censored, MODEL INDIRECT will be available. 

Jenny L. posted on Saturday, May 11, 2013  9:46 am



Thank you for your advice, Prof. Muthen. But I thought we can't treat count variables as continuous because they are not normally distributed? Even though the count variable I mentioned above is an average of 2 coders' counting results, the data distribution is still not normal. In this case, can I remove the COUNT option and treat it as a continuous variable? 


The sum or average of a count variable is not a count variable. That is why I mentioned continuous or censored. Censored may be the better choice. But you can't treat the sum or average as a count variable. 

Jenny L. posted on Saturday, May 11, 2013  11:47 am



Thank you for your suggestion, Prof. Muthen. I treated the mediator as a censored variable (cesored from below),but I still got the same error message:"MODEL INDIRECT is not available for analysis with ALGORITHM=INTEGRATION." Could you advise how I can fix the problem? Here's the code I wrote: CENSORED IS OwnP_T1(b); ANALYSIS: TYPE IS missing; ESTIMATOR IS MLR; ITERATIONS = 1000; CONVERGENCE = 0.00005; 


Use the default WLSMV estimator. 

Jenny L. posted on Saturday, May 11, 2013  2:13 pm



Thank you for your help! 


I had missing values in my independent variable and I added integration = montecarlo in the analysis command. Now I get this warning message: "The INTEGRATION option is not available with this analysis. INTEGRATION will be ignored. Specify ALGORITHM=INTEGRATION to use this option." What should I do? Will it affect my results? 


Add ALGORITHM=INTEGRATION to the ANALYSIS command. 


Hello I am trying to run a mediation model using both binary mediator and outcome with Montecarlo integration on a complex sample. The model terminate normally but I don’t have any usual goodness fit of sem model (I only have likelihood with AIC and BIC). I wonder if there any way I could check out if the model has a good fit. Thank you. 


Look for TECH10. 


There are no absolute fit statistics available for models where numerical integration is required. You can compare nested models using 2 times the loglikelihood difference which is distributed as chisquare or compare models with the same set of dependent variables using BIC. 


Thank you! 


Dear Linda, i am trying to run a multilevel mediation model with onr predictor, two mediator and one dependent variable. my data is daily survey data and below is my model code title: state self control twolevel random analysis data: file is sleep_all_means_lag.txt ; variable: names = day ID SEX AGE p_E p_I p_N p_C p_A p_SCC p_SP p_GS p_SSQ P_SSQ_60 p_IS m3 m4 m5 m6 m1 m2 x5 v1 x1 x2 x3 x4 y1 y2 y3 y4 ; usevariables = x1 m2 v1 y1 id ; missing = all (999) ; within = x1 ; between = ; cluster = id ; analysis: type=twolevel random ; estimator = ML ; model: %WITHIN% s1 m2 ON x1 ; s2 v1 ON m2 ; s3 y1 ON v1 ; %BETWEEN% m2 WITH s1 s2 s3 v1 y1 ; v1 WITH s1 s2 s3 y1 ; y1 WITH s1 s2 s3 ; s1 WITH s2 (c12) ; s1 WITH s3 (c13) ; s2 WITH s3 (c23) ; [s1](s1); [s2](s2); [s3](s3) ; MODEL CONSTRAINT: NEW(ind1) ; ind1=s1*s2*s3+c12+c13+c23 ; output: sampstat tech1 tech3 cinterval ; and i got error message "*** FATAL ERROR THIS MODEL CAN BE DONE ONLY WITH MONTECARLO INTEGRATION." could you explain why this error message revealed? and how can i fix this problem? thank you for your help! 


Add INTEGRATION = MONTECARLO; to the ANALYSIS command. Your model requires this type of numerical integration. 

Back to top 