Mediation analysis with multiple pred... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Wei Yi posted on Saturday, September 22, 2018 - 8:50 am
I am running a mediation analysis with 3 predictors, 3 mediators and 2 outcomes using Mplus for a vocabulary learning experiment, but I don’t know how to write the code for it. I appreciate it if anyone can help me.

I want to examine: 1) how vocabulary characteristics (LNTH, CONC and INFO) predict the attention paid to unfamiliar words, as captured by total reading time (TRT, in milliseconds), fixation counts (FXC) and skipping rates (SKIP, binary); 2) how TRT, FXC and SKIP predict vocabulary learning (FORM and MEANING); 3) whether TRT, FXC and SKIP are mediating the relationship between LNTH/CONC/INFO and vocabulary learning (FORM and MEANING).

• The dataset is cross-classified, with observations nested within participants and words. Random intercepts for subjects and words are preferred.
• The 3 predictors (LNTH, CONC, INFO) may cluster as a latent variable SALIENCE. Currently I run the model on the measured level.
• The 3 mediators (TRT, FXC, SKIP) may cluster as a latent variable ATTENTION, Currently I treat them as separate variables.
• The 2 outcome variables (FORM and MEANING) may be incorporated simultaneously. Currently I run separate models for them.
• Several participant-level (e.g.,proficiency) and word-level covariates (number of phonemes) need to be considered.
• Missing data included.
 Bengt O. Muthen posted on Monday, September 24, 2018 - 4:58 pm
You can write out your model on the first level as usual like

%Within%

y1 y2 on m1 m2 m3 x1 x2 x3;
m1 m2 m3 on x1 x2 x3;

and then allow for random intercepts on both of the crossed levels for the 2+3=5 dependent variables y and m; see UG ex 9.25.
 Wei Yi posted on Monday, September 24, 2018 - 6:52 pm
Dear Dr. Muthen,

Thank you for your kind help. I wrote the following code following your advice:

VARIABLE:
NAMES ARE SUBJECT ITEM CONC LNTH INFO SKIP TRT FXC FORM MEANING PROF;
USEVARIABLES = SUBJECT ITEM CONC LNTH INFO SKIP TRT FXC FORM MEANING;
CATEGORICAL = SKIP FORM MEANING;
CLUSTER = SUBJECT ITEM;
MISSING = .;

ANALYSIS:
TYPE = CROSSCLASSIFIED RANDOM;
ESTIMATOR = BAYES;
PROCESSORS = 2;

MODEL:
%WITHIN%
FORM MEANING ON SKIP TRT FXC CONC LNTH INFO;
SKIP TRT FXC ON CONC LNTH INFO;

%BETWEEN SUBJECT%
SKIP ON SUBJECT ;
TRT ON SUBJECT ;
FXC ON SUBJECT ;
FORM ON SUBJECT ;
MEANING ON SUBJECT ;

%BETWEEN ITEM%
SKIP ON ITEM;
TRT ON ITEM;
FXC ON ITEM;
FORM ON ITEM;
MEANING ON ITEM;

OUTPUT:
TECH1 TECH8;

Yet I got an error message "Unknown variable(s) in an ON statement: SUBJECT". I think I should have got it wrong when specifying the random intercepts (I meant that the effect of IVs partially come from individual differences among items and subjects). Do you have any problem in my codes? Also, I am not sure how to add any covariates (e.g., PROF). I thank you so much with all the support you provided!

Regards,
Wei
 Bengt O. Muthen posted on Wednesday, September 26, 2018 - 6:31 pm
Cluster variables cannot be used in model statements. See our UG examples.
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: