Variable as categorial in mediation a... PreviousNext
Mplus Discussion > Categorical Data Modeling >
Message/Author
 leon winter posted on Tuesday, October 06, 2015 - 9:44 am
Hey guys,
I need to modify a variable in our Script from continuous to categorial.

"magnitude" needs to be changed from continous (0 to 5) to categorial (i.e., 5 categories). We use this variable to investigate a moderated mediation. With "behaint" being the mediator and "mattr" being the outcome (DV).

Thank you so much!!

VARIABLE:
NAMES = idno magnitude behaint mattr discrmb divb social gender;

USEVARIABLES = magnitude behaint mattr discrmb divb social gender
gen_now dis_now gen_pdm div_pdm;

MISSING = ALL (-1);

DEFINE:
gen_now = gender*magnitude;
dis_now = discrmb*magnitude;
gen_pdm = gender*behaint;
div_pdm = divb*behaint;

ANALYSIS:
TYPE = GENERAL;
ESTIMATOR = ML;
ITERATIONS = 1000;
BOOTSTRAP = 10000;

MODEL:
!predict outcome, name paths as per diagram

mattr ON social;
mattr ON magnitude (cdash);
mattr ON behaint (b1);
mattr ON divb (b2);
mattr ON gender (b3);
mattr ON div_pdm (b4);
mattr ON gen_pdm (b5);
 Bengt O. Muthen posted on Tuesday, October 06, 2015 - 5:33 pm
The magnitude variable is an IV, not a DV so I wouldn't bother to change it from being treated as continuous. It would also be difficult to do as it is part of interactions.

The MODEL does not show mediation.
 leon winter posted on Wednesday, October 07, 2015 - 7:20 am
cool! Thx for the feedback
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: