Categorical predictors PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 William Dudley posted on Thursday, August 03, 2006 - 6:54 am
Apologies in advance if this is a repeat posting, my system hiccupped a while ago and I lost track of my posting.

I am trying to model a mediation model in which a X is a binary predictor (treatment vs. control), M is a mediator (continuous), and Y is a Binary outcome. I am interested in the indirect effect of X on Y as it passes through M. My syntax and ensuing error are shown below:


title:
Mediation Dichotomous
data:
file= 'C:\test.txt';
variable:
names=X M Y;
USEVARIABLES ARE X M Y;
CATEGORICAL ARE Y X;

MODEL:
Y ON X;
Y ON M X;

MODEL INDIRECT:
Y VIA M X;



ERROR:

*** ERROR in Variable command
CATEGORICAL option is used for dependent variables only.
X is not a dependent variable.
 Linda K. Muthen posted on Thursday, August 03, 2006 - 7:00 am
The CATEGORICAL option is for dependent variables. The variable x is an independent variable. You should take x off of the CATEGORICAL list. The scale of independent variables does not affect model estimation.
 William Dudley posted on Monday, August 14, 2006 - 3:39 pm
Linda,

Thanks, for the clarification on how to state the measurement quality of the variables. I'd like to continue this line with a more simple question about how to create my model.

How do I estimate a mediation model in which the effects of X on Y are mediated by M, and in which X and Y are binary? (I see from you earlier comment that I do not declare X as binary.) I want to obtain the estimates of the indirect effects of X on Y through M and the SE of the indirect estimate? In this model the regression of M on X is a linear regression and Y on X and Y on M & X are logistic regressions.

Thanks in advance,
Bill
 Linda K. Muthen posted on Monday, August 14, 2006 - 6:11 pm
You can use MODEL INDIRECT to obtain the indirect effects. In the input you showed earlier, you will obtain probit regressions with the default weighted least squares estimator for categorical dependent variables and linear regressions for continuous dependent variables. The indirect effect is the product of the two regression coefficients. You will obtain standard errors using the Delta method and can also request bootstrap standard errors.
 William Dudley posted on Tuesday, August 15, 2006 - 6:30 am
Linda
I am still not hitting the mark. I ran the Syntax below, to estimate the indirect effects. But as can be seen from the output below, the estimate for the effect from X to Y via M is 0. The data input to this analysis was generated randomly, and was designed to have a net indirect effect.

I do not know if this is related, but the model Indirect statement is the only keyword with the colon that does not change to blue in the syntax file. All others like data:, variable:, Model:, etc change color as soon as the colon is applied.

Once again,
Thanks in advance
Bill


CODE:

title:
Mediation Dichotomous
data:
file= 'C:\test.txt';
variable:
names=X M Y;
USEVARIABLES ARE X M Y;
CATEGORICAL ARE Y;

MODEL:
Y ON X;
Y ON M X;

MODEL INDIRECT:
Y VIA M X;



Output:

MODEL RESULTS

Estimates S.E. Est./S.E.

Y ON
X 0.391 0.084 4.675
M 0.382 0.041 9.393


R-SQUARE

Observed Residual
Variable Variance R-Square

Y 1.000 0.198


TOTAL, TOTAL INDIRECT, SPECIFIC INDIRECT, AND DIRECT EFFECTS


Estimates S.E. Est./S.E.

Effects from X to Y via M

Sum of indirect 0.000 0.000 999.000
 Linda K. Muthen posted on Tuesday, August 15, 2006 - 8:53 am
You would need to send your input, data, output, and license number to support@statmodel.com so I can see what is happening. I suspect you are not using Version 4.1 and that you are running into a bug from an earlier version.
 Ulrich Keller posted on Wednesday, June 12, 2013 - 7:38 am
Dear Dr. Muthén,

I have a question concerning the standardized output in a mediator analysis, in which "X" is a binary (manifest) predictor (gender), "M" is a continuous latent (factor) mediator (based on categorical items), and "Y" is a continuous latent factor outcome variable (based on categorical items).

The problem is that I do not receive any error message, but the standardized outputs for SE, p-values, and indirect effects are not printed (in contrast to the unstandardized output). As the standardized outputs usually have to be reported in papers, I want to ask if you know a solution. Alternatively, if the standardized estimates are not estimated in MPlus by default, what would you suggest to report?

Syntax:

names=X M Y;
USEVARIABLES ARE X M Y;
Categorical ARE "indicators of M and Y"

ANALYSIS:
TYPE IS GENERAL;
ESTIMATOR IS WLSMV;

MODEL:
M ON X;
Y ON M X;

MODEL INDIRECT:
Y IND M X;

Thank you very much!
 Linda K. Muthen posted on Wednesday, June 12, 2013 - 8:09 am
With WLSMV, we don't give standard errors and p-values for standardized estimates when the model contains covariates.
 Ulrich Keller posted on Wednesday, June 12, 2013 - 8:37 am
Thank you very much for the quick reply!

A reviewer asked us to provide standardized estimates. Do you suggest to report unstandardized estimates to show significant influences of mediators and to explain that Mplus does not report standardized estimates of SE and p-values when using WLSMV and covariates? Do you have any other suggestions for alternative procedures or a reference we could cite?
 Bengt O. Muthen posted on Wednesday, June 12, 2013 - 3:41 pm
Yes.

No.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: