Path analysis with a mix of categoric... PreviousNext
Mplus Discussion > Structural Equation Modeling >
 Daniel Rodriguez posted on Thursday, January 08, 2004 - 10:02 am
I am analyzing a path analysis model with one endogenous variable (the primary outcome) being categorical (binary) and the other (a potential mediator) being continuous. Is the aim in my path analysis the same as it is when all outcomes are continuous, to reproduce as closely as possible the variance-covariance matrix?
 bmuthen posted on Thursday, January 08, 2004 - 10:09 am
In this case you are using a limited-information weighted least-squares where the model is fitted to sample-estimated multivariate probit thresholds, slopes, and residual correlations. Same number of quantities are used for the fitting but different ones from the continuous case of means, variances, and covariances.
 Daniel Rodriguez posted on Thursday, January 08, 2004 - 10:14 am
Thank you. I am planning to submit my paper for publication. What would you recommend presenting in the results section, a correlation matrix does not seem appropriate given the categorical outcome. Or are the fit indices plus a figure with standardized path coefficients sufficient?
 bmuthen posted on Thursday, January 08, 2004 - 10:17 am
I think what you suggest is good, but also add unstandardized coefficients and their SEs.
 Anonymous posted on Monday, December 13, 2004 - 7:26 am
I am experimenting with the examples in the Mplus guide (ex 3.12)that use binary outcomes as dependent/endogenous measures. I was wondering if there are any peer reviewed publications that have used this technique? I would like to use this in a paper that I am planning to send out for publication and I would like to cite some studies that do this. Thank you.
 bmuthen posted on Monday, December 13, 2004 - 8:28 am
You many want to look at the article by Xie on the Mplus web site, Reference section.
 Anonymous posted on Saturday, May 21, 2005 - 2:32 pm
Hi, there is an article regarding SEM of discrete data by Winship and Mare (1983) in the American Journal of Sociology ("Structural Equations and Path Analysis for Discrete Data."). If you are aware of it, could you please let me know the similaries/differences between their estimate and the MPlus estimation of discrete variables? Thanks!

 bmuthen posted on Saturday, May 21, 2005 - 4:19 pm
Yes, I am aware of this article, but I don't recall the content other than that I think a different tack was taken than in my work from the late 70's and early 80's. I should take another look at the article - do you have a pdf handy so I can refresh my memory of it?
 bmuthen posted on Sunday, May 22, 2005 - 2:47 pm
Thanks for sending the Winship-Mare (1983) article. Its relationship to the categorical variable modeling in Mplus is clear from examples like the one they start off with - social background (x, say) influencing the mediator of getting a college degree (y, say), influencing unemployment (z, say). As in the econometric literature, they make it clear that while x->y is naturally a logit or probit regression, the specification of the influence of the mediator on z may either use the 0/1 dummy variable y itself or an underlying continuous latent response variable y* (that gives rise to y=1 instead of y=0 when exceeding a threshold). They discuss ML estimation using probit for some simple special cases. The literature indicates that ML using y* gives a different loglikelihood than ML using y, and as pointed out in the article different applications naturally call for different choices.

Using the simple example above, Mplus makes the y* choice when using probit modeling and (limited-information) WLS type estimators that I developed in my 1978-1984 work on LISCOMP. More recently, the y choice has also been added to Mplus using logit with ML. We have plans to add the other combinations of using y/y*, probit/logit, and ML/WLS.

When all observed dependent variables are categorical, Mplus also offers the Feinberg-inspired "causal" modeling mentioned in the article. This is with multiple latent class variables as mentioned in Chapter 13 of the Version 3 User's Guide, where a latent class variable can be specified to be perfectly measured by an observed categorical variable (this feature also enables loglinear modeling of frequency table data, using the alternative loglinear parameterization).

Hope this answers your question.
 Anonymous posted on Wednesday, June 08, 2005 - 2:36 pm
I have two endogenous variables, Y1 is binary (0/1), and the other (Y2) has three categories, which are coded as 0/1/2:

Y1 ON Y2 X1 X2
Y2#1 Y2#2 ON X1 X3

In the second equation (Y2 is the dependent variable), I use Y2=0 as the comparison baseline, but how can I make Y2=0 as the comparison baseline in the first equation when Y2 is an independent variable?
 Linda K. Muthen posted on Wednesday, June 08, 2005 - 5:19 pm
A nominal variable cannot be a mediating variable in Mplus. It is unclear how to deal this situation because it would be treated as nominal when it is a dependent variable but would need to be treated as a set of dummy variables as an independent variable.
 Anonymous posted on Wednesday, June 08, 2005 - 6:43 pm
Thanks a lot. If there is an order between the three categories of Y2 (0-->1-->2), can I treat Y2 as ordered categorical (ordianal)? In another word, can an ordinal variable (ordered categorical) be a mediating variable in MPLUS?
Again, I want one of the three categories (e.g., "Y2=0") as the comparison baseline in both equations (i.e., in the equation when Y2 is the dependent variable and in the equation when Y2 is an independent variable). Thanks again!
 Linda K. Muthen posted on Thursday, June 09, 2005 - 8:18 am
Yes, ordinal variables can be used as mediating variables. With weighted least squares estimation, probit regression is obtained. With maximum likelihood estimation, logistic regression is obtained.

There is no reference category with ordinal dependent variables.
 Anonymous posted on Thursday, June 09, 2005 - 9:28 am
Thanks a lot. If there is no reference category with ordinal dependent variables, how I can interpret the results (for both cases: when the ordinal variable is an independent variable and when it is a dependent variable)? If an ordinal variable only has three categories, it may not be appropriate to see it as continuous.
 Anonymous posted on Thursday, June 09, 2005 - 4:19 pm
Please allow me to rephrase the above question. I now know how to interpret ordinal logit regression. And my three questions are:

(1) In the example above, if Y2 is ordinal, it is fine for it to be a dependent variable in the second equation (Y2 ON X1 X3), but how to treat it when it is an independent variable in the first equation (Y1 ON Y2 X1 X2)? Y2 has only three categories (0/1/2) so that I doubt we can treat it as a continuous independent variable, and I wonder if it is appropriate to generate two dummy variables corresponding to Y2=1 and Y2=2 to replace Y2 in the first equation (Y1 ON Y2 X1 X2).

Alternatively, can I do this in the following way? First, generate three dummy variables Y20, Y21, and Y22, corresponding to Y2=0, Y2=1, and Y2=2. Then, run equations:

Y1 ON Y21 Y22 X1 X2
Y21 Y22 ON X1 X3

The following questions are:
(2) Should I specify Y20 as CATEGORICAL as well?
(3) Should I add Y20 as a dependent variable in the second equation? If I add Y20 (or don’t add it), is there any technical problem?
 bmuthen posted on Thursday, June 09, 2005 - 6:28 pm
(1) The default option in Mplus is to use WLSMV which takes a probit approach in which case the equation where Y2 is an independent variable, an underlying continuous latent response variable Y2* is used to predict Y1. For a discussion of related matters see the Xie article on the Mplus web site and also the Winship-Mare 1983 article discussed earlier in this forum.

Don't create dummy Y2 variables if you want to treat it as ordinal. Stay with the approach I just mentioned.

(2)-(3) Not relevant given my answers above.
 Anonymous posted on Thursday, June 09, 2005 - 8:20 pm
Thanks a lot! Two more questions regarding interpretation:

(1) When the ordered categorical (ordinal) variable is an independent variable, since it is treated as a latent continuous variable, can I interpret its coefficient like interpreting a continuous variable?
(2) When the ordered categorical (ordinal) variable is a dependent variable, how to interpret the coefficients of independent variables in a meaningful way? (now the dependent variable is not a binary variable but has more than two categories)
 bmuthen posted on Friday, June 10, 2005 - 6:16 am
(1) Yes

(2) The slope can be interpreted the same as with a continuous dependent variable given that an ordinal dependent variable can be seen as a continuous latent response variable that exceeds thresholds to give the various outcome categories. There is therefore only one slope. See also Appendix 1 in the Technical Appendices on the Mplus web site.
 liesbeth mercken posted on Tuesday, March 28, 2006 - 1:22 am
I have several questions concerning a SEM analysis I am trying to run.
I have some categorical variables and some other variables with extreme missing values. I do not have any latent variables in my model.
The analysis always terminates normally but I don’t know if I can trust the results,
although they are very stable.

Type= missing;
Estimator= mlr;
Integration= montecarlo;
(mcseed I tried because the error said something about a starting value.. but it makes no difference)

In the output I see 2 warnings / errors:


190 603 119 134 611
Error B only appeared when I included 17 dummies in my model (for the 18 schools-this was originally a categorical variable)

After these errors the output states that the model estimation terminated normally.

1.What do these errors mean?
2.How can I correct for them?
3.Can I get fit indices like TLI CFI by putting H1 in the type command?


PS: I will attend to your course in Utrecht although it is not specifically what I am doing… can I bring my output also to the course?
 Linda K. Muthen posted on Tuesday, March 28, 2006 - 8:53 am
This error message is serious. Your model has a lot of parameters. I wonder how large your sample is. You need more observations than parameters. I can't say much more without more information. Please send your input, data, output, and license number to

I don't think H1 is available with the estimator you are using but I would need to see your entire model to answer that.

It is unlikely that we will have time to look at output at the Utrecht meeting. You should send your questions to support.
 Wendong Li posted on Sunday, February 21, 2010 - 3:51 am

I am running a model with all continuous variables but one categorical variable as a control. I am not interested in whether there is any difference among different categories of this variable and just want to partial out its impact. Can I just put it in the model, tell the program it is categorical and then regress the outcome variable on it?

Thanks in advance!
 Linda K. Muthen posted on Sunday, February 21, 2010 - 6:38 am
You can include it and regress the outcome variable on it but you should not put it on the CATEGORICAL list. This list is for dependent variables only. The model is estimated conditioned on the observed exogenous variables and their scale is not relevant.
 Wendong Li posted on Sunday, February 21, 2010 - 10:40 pm
Thanks a lot for your input, Linda!
 haxha posted on Monday, November 08, 2010 - 10:18 pm
Hi Linda, in page 496 of the manual version 5, you indicate that Bootstrap is not available for MLR due to the parameter estimates and bootstrap standard errors for these estimators not differing from those of ML. I am not quiet sure I understand this? Would this mean that that there is no need to use bootstrap with MLR because the results are identical? Sorry I'm a novice in Path Analysis and would like to use some type of simulation to ensure that my results are not biased. Any suggestions other than cross-validation and holdover sampling method?
 Linda K. Muthen posted on Tuesday, November 09, 2010 - 5:57 am
Yes, the parameter estimates are the same for ML, MLR, and MLF. So if you used bootstrapping with any one of these to obtain bootstrapped standard errors, the results would be identical. For simplicity we make bootstrap available only with ML.
 Regan posted on Saturday, November 20, 2010 - 12:07 am

Two questions:
1) After reading a response on the site, I wanted to clarify that if a binary 0/1 bvariable is included as a mediator, it does not have to be declared as categorical in the "CATEGORICAL ARE" command, ( I ask because I know this must be done for dependent outcome variables, however, in an SEM class, it was said that all variables with arrows going into them were considered dependent)

2)Are pvalues available for correlations obtained in Mplus? I see that users publish correlations with pvalues, but these do not seem to be part of the Mplus output.
 Linda K. Muthen posted on Saturday, November 20, 2010 - 7:49 am
1. A mediator is a dependent variable and if it is binary it should be placed on the CATEGORICAL list.

2. Not for sample correlations. You can estimate a model of correlations or covariances and obtain p-values in this way.
 Stacey Conchie posted on Thursday, February 24, 2011 - 2:15 am

This is a very basic question so apologies in advance.

I have a mediation model comprising 5 continuous latent constructs (1xIV; 1xM; 3xDV)and three control measures (the latter are directly observed). One of my control measures is binary (0=no/1=yes). Would I be correct in thinking that I don't enter the binary measure on the line 'CATEGORICAL ARE' as it's not the DV? When I don't specify this measure as categorical the model runs fine. However, when I do specify it as categorical I recieve a meassage that I must use montecarlo integration and that I cannot estimate indirect effects. Using this integration technique runs the data, but I don't get any fit indices for the model.


 Linda K. Muthen posted on Thursday, February 24, 2011 - 6:14 am
Only dependent variables should be placed on the CATEGORICAL list. Observed exogenous variables should not be put on this list.
 Mohamed Abou-Shouk posted on Sunday, April 24, 2011 - 6:46 am
If i have a binary outcome variable(1=adopt, and 0=nonadopt)and i want to measure the impact of factors affecting the adoption, these factors are continuous latent variables but are divided to four main factors; f1, f2, f3, and f4.
the question is: do i have to run Path analysis with categorical dependent variable as in example 3.12?
If yes, i have used ML to get logistic regression results, but the second question is, do these results target the adopt category or nonadopt? in other words, if i want to say that f1 affects positively u1? in this case is u1 adopt or non adopt category?
I hope you get my meaning.

 Linda K. Muthen posted on Sunday, April 24, 2011 - 10:44 am
Example 3.12 uses weighted least squares not maximum likelihood. This yields probit regression coefficients. For maximum likelihood and logistic regression, you must add ESTIMATOR= ML; to the ANALYSIS command. Note that if your factor have categorical factor indicators, this would result in four dimensions of integration.

U1 is adopt. It is the highest category.
 Arina Gertseva posted on Thursday, May 12, 2011 - 11:07 am
I am testing the extent to which delinquent peers and depression condition the relationship between victimization and offending (offending is a binary outcome (1=offending 0=no offending). I conducted analysis on the overall sample as well as on each gender group. The results are very similar, with an exception of a few parameter estimates. My question is: how appropriate is to conduct coefficient comparison test across gender groups without running a multiple group analysis?

If yes, which formula can I use? Thank you.
 Bengt O. Muthen posted on Thursday, May 12, 2011 - 6:36 pm
You get a statistical test of gender equality if you do a multiple-group analysis. I think that is highly desirable.
 Owis Eilayyan posted on Monday, February 27, 2012 - 11:29 am

I am using mplus 5 to run an ordinal regression and path analysis model. i have missing values, but less than 10%. The program excludes all observations that have missing values from the analysis. could you please tell me how can i insert all observations i have in my analysis.

 Linda K. Muthen posted on Monday, February 27, 2012 - 11:34 am
Version 5 has TYPE=MISSING as the default. Cases must be excluded that have missing on observed exogenous x variables. This is because missing data theory does not apply to these variables. If you mention their means, variances, or covariances in the MODEL command, they will be treated as dependent variables and distributional assumptions will be made about them. The subjects will not, however, be excluded from the analysis.
 Owis Eilayyan posted on Monday, February 27, 2012 - 11:58 am
Thanks for your response, but how can i mention their means. do you mean put then in brackets?
 Owis Eilayyan posted on Monday, February 27, 2012 - 12:44 pm
This is my command. could you please tell me how to mention the mean or the variance in the MODEL command.


TITLE: this is an example of a logistic
regression for a categorical observed
dependent variable with two covariates
DATA: FILE IS C:\Users\Admin\Desktop\MGH\path3.dat;
VARIABLE: NAMES ARE smo em sym pf ef sf re bmi age fev gender act5 actc;
USEVARIABLES ARE smo em sym pf ef sf re bmi age fev gender act5;
missing = .;
MODEL: act5 ON smo em sym pf ef sf re bmi age fev gender;
 Linda K. Muthen posted on Monday, February 27, 2012 - 1:31 pm

act5 ON smo em sym pf ef sf re bmi age fev gender;

smo em sym pf ef sf re bmi age fev gender;
 Owis Eilayyan posted on Monday, February 27, 2012 - 1:45 pm
Thanks a lot.

Usually i use SAS for statistical analysis. in SAS we can define the categorical variable (i.e reference group). Does Mplus do that?

 Linda K. Muthen posted on Monday, February 27, 2012 - 6:16 pm
You can use the DEFINE command to create a set of dummy variables for a categorical covariate.
 Owis Eilayyan posted on Monday, February 27, 2012 - 7:02 pm
Actually i have the categories already. but in the results interpretation, we should have reference group in categorical variables. for example, male are more likely to have the disease. so the reference group is male and the interpretation is for male not female.

 Linda K. Muthen posted on Tuesday, February 28, 2012 - 10:14 am
With a dummy variable, 0 is the reference group and 1 is the group for which the effect is relevant.
 Owis Eilayyan posted on Tuesday, February 28, 2012 - 6:31 pm
Thanks a lot Linda
 Owis Eilayyan posted on Wednesday, February 29, 2012 - 7:08 am
Hi Linda again,
i did as what you told me last time regarding analyse all available values. you told me to mention their means, variances, or covariances in the MODEL command. you gave me the command, but it is the covariances and the is no covariances between these exogenous variables. could you please tell me how can i mention just their means or variances.

 Linda K. Muthen posted on Wednesday, February 29, 2012 - 9:28 am
I gave you the command for the variances not the covariances. If you have further problems with this, please send your output and license number to
 chris pp posted on Thursday, April 05, 2012 - 9:59 pm

I'm running a SEM where one of the variables ('nage') is categorical (dichotomous) and is modelled as a predictor of one continous variable, and an outcome of another continuous variable.

There seems to be less output on the standardized results when this variable
is set as categorical (only showing StdYA under the STANDARDIZED MODEL RESULTS). Are there additional commands required to generate more output in this case?

The syntax is:

nage social selfr pa pop;



MODEL: sr BY selfr@0.78;


soc BY social@.72;


sr ON edu cfit;

soc ON sr pop cfit;

pa ON pop soc;

nage ON edu;

cfit ON edu;

pop ON nage edu;
 Linda K. Muthen posted on Friday, April 06, 2012 - 7:02 am
With the default WLSMV estimator, standard errors for the standardized solution are not available when the model has covariates.
 Aylin posted on Monday, June 25, 2012 - 8:39 am
Dear Professors,
I am running the following model: (using WLSMV estimator)

Usevariables are
vic IQ daw emot PL12 PL18 dep sex;
Categorical are
vic daw PL12 PL18 dep;

Parameterization = theta;

IQ with daw;
vic with emot;
vic on IQ daw;
emot on IQ daw;
dept with PL12 ;
vic emot daw IQ on sex;
dept PL12 on sex vic emot IQ daw;
PL18 on sex dept PL12 vic emot IQ daw;

So my questions are:
1) As I am using both categorical and continuous variables does that mean my path analysis consists of both linear and probit regressions? So "emo (continuous) on daw (categorical) = linear regression" and "vic (categorical) on IQ (continuous) = probit regqression" is this correct?

2) Then what are the correlations? for example "IQ (continuous) with daw (categorical)" is this a coveriance or a tetrachoric correlation?

Thank you very much.
 Linda K. Muthen posted on Monday, June 25, 2012 - 10:27 am
1. If the dependent variable is continuous, the regression coefficient is linear. If the dependent variable is categorical, the regression coefficient is probit.

2. Continuous with categorical is a biserial or polyserial correlation. Binary with binary is a tetrachoric correlation.
 Aylin posted on Monday, June 25, 2012 - 10:28 am
Thank you very much
 Ellen posted on Thursday, April 10, 2014 - 8:08 am
I am doing a path analysis that includes a dicotomous endogenous variable(Y1) and censored endogenous variables(Y2, Y3).
I want to test the relationship Y2 with Y3(non recursive model)

X1, X2 -> Y1(dicotomous)
Y1 -> Y2(censored)
Y1 -> Y3(censored)
Y2 -> Y3
Y3 -> Y2

But I get an error message that the latent variable covariance matrix(psi) is not positive definite.PROBLEM INVOLVING VARIABLE Y3.
I checked TECH 4, but I don't know what is wrong.
Could you help?
 Linda K. Muthen posted on Thursday, April 10, 2014 - 9:42 am
Please send the output and your license number to
 Marie Alice posted on Thursday, March 19, 2015 - 12:28 am
I am doing path analysis with a continuous outcome variable. My understanding is that when an independent variable is categorical, it is not an issue.

1. But when I have a mediator (parental aspiration: university and above=1) that is categorical, should I specify so using the command "categorical="?

2. When I have an independent variable, that is controlled by another variable, should I also specify it as categorical? (For example, in modelling single parent->income->child's achievement, I also model parent's education->single parent to control for selection bias. In such case, should I specify single parent as categorical?)

I ask, as I see that the coefficients change dramatically whether I specify the variable as categorical or not.
 Linda K. Muthen posted on Thursday, March 19, 2015 - 6:02 am
You should specify the scale of any endogenous dependent variable that you want to treat other than as continuous. The scale of observed exogenous variables should not be specified.
 Marie Alice posted on Thursday, March 19, 2015 - 6:39 pm
Thank you for response.
So for that path (pointing into a dichotomous variable), I should interpret the coefficient as a logit coefficient, whereas all other variables (pointing into continuous variables) are regression coefficients?
 Linda K. Muthen posted on Friday, March 20, 2015 - 8:28 am
With WLSMV, you obtain a probit regression coefficient for a categorical dependent variable. With ML, you obtain a logistic regression coefficient for a categorical dependent variable as the default. You can request a probit regression coefficient using the LINK option.

Linear regression coefficients are obtained for continuous dependent variables.
 thanoon younis posted on Monday, March 23, 2015 - 2:14 am
Hi Dr. Muthen
I want to ask you about path analysis with ordered categorical variables. I have 6 independent variables (ordered categorical) treated as exogenous variables and 2 dependent variables (endogenous var.) one of them is mediator. My question now how can i analysis this type of path analysis when the dependent variables are latent variables and the independent vars. are ordered categorical and can i use probit regression on indep. vars. and put a zero variables in latent vars.
many thanks in advance
 Bengt O. Muthen posted on Monday, March 23, 2015 - 1:55 pm
Don't put IVs on your categorical list; that should be done only to DVs.

Apart from that, your setting is standard SEM.
 thanoon younis posted on Monday, March 23, 2015 - 7:16 pm
Many thanks to you for your response i want to ask you what about latent variables now are a dependent variables so can i put a zero values for that?

 Bengt O. Muthen posted on Monday, March 23, 2015 - 8:38 pm
With latent variables as dependent variables you use regular linear regression even though the DV is latent. I don't know what you mean by putting a zero value for that.
 thanoon younis posted on Monday, March 23, 2015 - 9:42 pm
because and as you know the latent variables are unobserved so there is no values for these variables. can i put a zero's matrix for these variables.

 Bengt O. Muthen posted on Tuesday, March 24, 2015 - 8:49 am
What is your aim - what is it that you are trying to do?
 thanoon younis posted on Tuesday, March 24, 2015 - 8:48 pm
Thank you for your response
I want to estimate the parameters of path analysis using Bayesian inference but i cannot leave the latent variables without any values. Can i use zero's matrix for that?

 Bengt O. Muthen posted on Wednesday, March 25, 2015 - 7:34 am
I still don't understand what you are doing. If you want to estimate a model with latent variables you don't need to give the latent variables values.
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