I am very sorry to bother you with my stupidity: Despite consulting the user guide, handouts and older forum entries, I still do not understand how to specify a three-way interaction. I would be extremely grateful for help! I conducted a diary study and thus have variables measured on person level (L2) as well as variables measured day level (L1). Basically I am interested in testing cross-level and three-way interactions: (a) A chronic stressor W (measured on L2) should moderate the relationship between a daily stressor X (measured on L1) and a strain variable Y (measured on L1). (b) The hypothesized moderation effect from the L2-predictor W on the L1-relationship of X and Y should be moderated by the daily sleep quality Q (measured on L1). I fear that my syntax is completely idiotic (again, I am so sorry!):
variable: names = case_nr Y X W; cluster = case_nr; between = W; within = Y X Q; centering = grandmean (W); centering = groupmean (X Q); analysis: %within% Y on X; Beta1 | Y on X; Beta2 | Beta1 on W; Q on Beta 2; ! three-way interaction %between% Beta1 on W; ! cross-level interaction Y with Beta1; ! intercept-slope covariance on L2
Dear Prof. Muthén, please forgive me for bothering you again: I would be tremendously grateful if you would be so kind to answer a follow-up question! It seems to me that in my new syntax W would now be the moderator of the moderator effect from Q on the daily relationship between X and Y - instead of Q being the moderator of the interaction between W and X, like hypothesized. Of course I know that two-way interactions are symmetrical and therefore from a statistical standpoint it is equally appropriate to label either variable as the moderator in the relationship. But is this also the case for three-way interactions? Thank you very much for your advice! For completeness sake, my new syntax would be: variable: names = case_nr Y X Q W; usevar = case_nr Y X Q W XQ; cluster = case_nr; between = W; within = Y X Q XQ; centering = grandmean (W); centering = groupmean (X Q); analysis: type = twolevel random; model: %within% Y on X; Beta1 | Y on X; Beta2 | Y on XQ; %between% Beta1 on W; !cross-level interaction Beta2 on W; !three-way interaction Y with Beta1; Y with Beta2; Define: XQ = Beta1 on Q; !two-way interaction between X and Q
If I may ask a question in relation to a three way interaction but this time adding a mediator measured at level 1.
So, in a nutshell, I have the predictor (x), the mediator (m), one of the moderators (v), and the criterion (y) measured at level 1. I also have a moderator (Q) measured at level 2 that based on theory should moderate the interaction between v and m in predicting y. (The level 1 moderator, v, moderates the b path between the mediator and the criterion).
I am not sure how to model the full model. Is the partial set-up below correct or am I missing something very obvious? Thank you so much in advance!
Warm regards, Laura
between=q; within=m v x mv; define mv=m*v; qm=q*m; qs=q*s;
analysis: type= twolevel random; model: %within% y ON x(cp); m ON x (a); y ON m (b1w) v(b2w); s| y ON mv;
%between% y ON q(b3b) s(b4b) qm(b5b) qs(b6b); s ON q (b7b);
Model constraint: NEW (ind); ind=a*(b1w+b4b(-1)+b5b*(-0.72)+b7b*(01)*(-0.72));
My research examines the influence of teaching practices (X1, X2, X3) on students’ autonomy (Y) in a two-level analysis, and whether theses associations are moderated by two within moderators (M1, M2). Here is my syntax for 3 three-way cross-level interactions, including control variables (C1, C2):
CLUSTER = Number; WITHIN = C1 C2 M1 M2 int; BETWEEN = C1ag C2ag M1ag M2ag X1 X2 X3; DEFINE: int=M1* M2; ANALYSIS: Type = twolevel random; MODEL: %WITHIN% Y on C1 C2; s1 | Y on M1; s2 | Y on M2; s3 | Y on int; %BETWEEN% Y on C1ag C2ag M1ag M2ag X1 X2 X3; s1 s2 s3 on X1 X2 X3; Y with s1 s2 s3;
QUESTIONS: 1) I have added relationships in comparison with previous posts, are those useful? (e.g. s2 | Y on M2;) 2) Following advices from Enders & Tofighi (2007), all within variables have been previously group-mean centered, and their aggregated means per group have been added on the between level (all ‘-ag’ variables). Between variables have been grand-mean centered. Is this method right and is it the right way to reintroduce the means? 3) Can cross-level interactions be calculated instead by defining, for ex., int=X1*M1*M2, and introducing this term on the within level? Is there any mathematical difference between this method and the one in my syntax? Thank you very much!
Dear Prof Muthén, My data contains daily observations from 71 people over 15 days. My study aims to examine a cross-level three-way interaction mediated model. The Independent variable(X), Mediator(M) and Dependent variable(Y) are all on level-1 (day-level). W1 (level-1) moderates the relationship between X and M, meanwhile this moderation effect is further moderated by W2 (level-2, person-level). All variables except W2(gender) are continuous variables. After reviewing all the above conversations, I came out with the following syntax (attached at the end). However, after running the syntax, the output said, “*** FATAL ERROR. THIS MODEL CAN BE DONE ONLY WITH MONTECARLO INTEGRATION.” I also tried to add “INTEGRATION = MONTECARLO; ALGORITHM=INTEGRATION” in the “Analysis” command, the model runs but cannot estimates standard errors of the coefficients. Your instruction on how to figure out this issue will be highly appreciated! Thanks a lot!
Syntax: WITHIN = X W1 XW1 Control_level1 ; BETWEEN = W2 Control_level2; DEFINE: XW1=X*W1 Center X W1 Control_level1 (Groupmean); Analysis: Type = TWOLEVEL RANDOM; MODEL: %WITHIN% s1 | M on X; s2 | M on XW1; M on W1 Control_level1; Y on M (b); Y on X W1 XW1 Control_level1; X W1 with XW1; X with W1; %BETWEEN% s1 ON W2 (a1); s2 ON W2 (a2); [s1](a10); [s2](a20); M ON W2 Control_level2; Y ON W2 Control_level2; M with s1 s2; Model constraint: New(sd_w ind1 ind_high1 ind_low1 diff1); sd_w=0.50034; ! W2’s standard error ind1=a10*b; ind_high1=a10*b+a1*sd_w; ind_low1=a10*b+a1*sd_w; diff1=ind_high1-ind_low1; New(ind2 ind_high2 ind_low2 diff2); ind2=a20*b; ind_high2=a20*b+a2*sd_w; ind_low2=a20*b+a2*sd_w; diff2=ind_high2-ind_low2; Output: sampstat;