Moderation in a two-level time series... PreviousNext
Mplus Discussion > Dynamic Structural Equation Modeling >
Message/Author
 Katerina Rnic posted on Wednesday, August 12, 2020 - 5:15 pm
Dear Mplus team,

My colleagues and I are conducting a DSEM model using twice-daily diary data, and am examining how minutes spent ruminating in person, over text, over social media, or on the phone predicts negative affect at the following time point. I would like to test whether sex moderates the effect of each form of co-rumination on later negative affect. Is the below input correct?


usevariables are ID Mins_Inperson Mins_Texting Mins_Socialmedia Mins_Overphone NegAff Sex_dummy;

CLUSTER IS ID;
between = Sex_dummy;
lagged = Mins_Inperson(1) Mins_Texting(1) Mins_Socialmedia(1) Mins_Overphone(1) NegAff(1);
tinterval = Prompt_Final(1);

analysis:
type is twolevel random;
estimator = BAYES;
Processor = 2;
BITERATIONS = 100000(2000);

model:
%within%
s_nn | NegAff ON NegAff&1;
s_ni | NegAff ON Mins_Inperson&1;
s_nt | NegAff ON Mins_Texting&1;
s_ns | NegAff ON Mins_Socialmedia&1;
s_no | NegAff ON Mins_Overphone&1;

%between%
s_nn-s_no ON sex_dummy;
Mins_Inperson Mins_Texting Mins_Socialmedia Mins_Overphone NegAff s_nn-s_no
WITH Mins_Inperson Mins_Texting Mins_Socialmedia Mins_Overphone NegAff s_nn-s_no;

output: tech1 tech8;
 Bengt O. Muthen posted on Wednesday, August 12, 2020 - 5:48 pm
Answered on Ashley's post.
 joz posted on Thursday, August 13, 2020 - 8:07 am
Hi,
Using DSEM, I am testing if ASAVP moderates autoregression & cross-lagged regressions of CRIT and NA. ASAVP is Level-2 variable; CRIT and NA are daily Level-1 variables.

1. Is the following syntax correct?
2. Is there a way to test whether ASAVP moderates CRIT on NA&1 as well as NA on CRIT&1 in the same model? I currently run them separately.

CLUSTER = id;
USEVAR = NA CRIT ASAVP NAASAVP CRITASAVP NAc CRITc;
BETWEEN = ASAVP;
Lagged = NA(1) CRIT(1);

DEFINE:
NAc=cluster_mean(NA);
CRITc=cluster_mean(CRIT);
NAASAVP = NA*ASAVP;
CRITASAVP = CRIT*ASAVP;

ANALYSIS:
TYPE = TWOLEVEL RANDOM;
Estimator = BAYES;
PROC = 2;
BITER = (5000);
THIN = 10;

MODEL:

%WITHIN%
p_crit_crit|CRIT ON CRIT&1;
p_crit_na|CRIT ON NA&1;
p_na_crit|NA ON CRIT&1;
p_na_na|NA ON NA&1;

%BETWEEN%
CRIT NA ASAVP NAASAVP CRITASAVP;
NA ON CRIT ASAVP CRITASAVP;
p_crit_crit with p_crit_na-p_na_na CRIT NA;
p_crit_na with p_na_crit-p_na_na CRIT NA;
p_na_crit with p_na_na CRIT NA;
p_na_na with CRIT NA;
CRIT with NA;

OUTPUT: TECH1 TECH8 STDYX;
 Bengt O. Muthen posted on Thursday, August 13, 2020 - 6:16 pm
1. I don't see why you have NAc and CRITc in the USEV list.

2. Yes.
 joz posted on Thursday, August 13, 2020 - 7:21 pm
Hi,
1. An error message suggested I put NAc and CRITc in USEV list. When I did so, error disappeared:

*** ERROR in DEFINE command A new variable created in DEFINE using the CLUSTER_MEAN function must be mentioned on the USEVARIABLES option and used in the analysis or mentioned on the AUXILIARY option.

So, is syntax listed above correct?

2. Ok. How do I test whether ASAVP moderates CRIT on NA&1 as well as NA on CRIT&1 in the same model? When I enter the following syntax, there's error *** FATAL ERROR RECIPROCAL INTERACTIONS. THIS MODEL CAN BE DONE ONLY WITH ALGORITHM=MH.


DEFINE:
NAc=cluster_mean(NA);
CRITc=cluster_mean(CRIT);
NAASAVP = NA*ASAVP;
CRITASAVP = CRIT*ASAVP;

ANALYSIS:
TYPE = TWOLEVEL RANDOM;
Estimator = BAYES;
PROC = 2;
BITER = (5000);
THIN = 10;

MODEL:
%WITHIN%
p_crit_crit|CRIT ON CRIT&1;
p_crit_na|CRIT ON NA&1;
p_na_crit|NA ON CRIT&1;
p_na_na|NA ON NA&1;

%BETWEEN%
CRIT NA ASAVP NAASAVP CRITASAVP;
NA ON CRIT ASAVP CRITASAVP;
CRIT ON NA ASAVP NAASAVP;
p_crit_crit with p_crit_na-p_na_na CRIT NA;
p_crit_na with p_na_crit-p_na_na CRIT NA;
p_na_crit with p_na_na CRIT NA;
p_na_na with CRIT NA;
CRIT with NA;
 Bengt O. Muthen posted on Friday, August 14, 2020 - 6:22 am
1. Don't create those 2 variables in Define if you don't use them in the Model command.

2. Send output to Support along with your license number.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: