3-level random slopes as predictors t... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Jiangang Xia posted on Friday, December 16, 2016 - 9:53 am
Dear Professors:
I have a three level model that uses level-2 random slopes as predictors at level-3. The issue is, it takes forever to run the model. Right now my computer is still running and it has been about 48 hours. The computer is not slow with four core, but the CPU is used only about 13%. Do you have any idea on the issue or any solutions/suggestions? Thanks.

Here is part of my code:

cluster are level3 level2;
between is (level2) x1 x2 x3 x4 x5 x6 x7;
analysis: type=threelevel random;
model:
%within%
y1 y2 y3 y4 y5 y6 y7;

%between level2%
s1 | y1 on x1;
s2 | y2 on x2;
s3 | y3 on x3;
s4 | y4 on x4;
s5 | y5 on x5;
s6 | y6 on x6;
s7 | y7 on x7;

%between level3%
z on s1 s2 s3 s4 s5 s6 s7;
 Bengt O. Muthen posted on Friday, December 16, 2016 - 5:14 pm
Try using

processors = 4;

Also, check the TECH8 screen printing to see how many dimensions of integration you have (I assume you use ML) and if you have any negative ABS changes in which case you may need more integration points.
 Derek Boy posted on Monday, January 22, 2018 - 6:12 am
Dear Dr. Muthen,

I have written some codes to model a three-level (random slopes) research scenario, involving a dependent variable Y modeled at all three levels (i.e., L1, L2, and L3), three independent variables Xw, Xb1, Xb2 modeled at L1, L2, and L3 respectively (where Xb1 is the aggregate of Xw and Xb2 aggregate of Xb1), as well as three moderating variables Zw, Zb1, and Zb2 modeled at L1, L2, and L3 respectively (where Zb1 is the aggregate of Zw and Zb2 aggregate of Zb1).

In the analysis, I was particularly interested in testing three cross-level interactions, firstly, the interaction between Zb1 and Xw on Y, secondly, the interaction between Zb2 and Xw on Y, and, thirdly, the interaction between Zb2 and Xb1 on Y.

Please kindly comment whether I wrote the codes correctly, And, whether there is any way to simplify them.
---------------------------------
CLUSTER = C_CN S_ID;
WITHIN = Xw Zw;
BETWEEN = (S_ID) Xb1 Zb1 (C_CN) Xb2 Zb2;
DEFINE: CENTER Xw Zw Xb1 Zb1 Xb2 Zb2 (GRANDMEAN);
ANALYSIS: TYPE = THREELEVEL RANDOM;
MODEL:
%Within%
S1 | Y on Xw;
Y on Zw;
%Between S_ID%
S2 | Y on Xb1;
Y on Zb1;
S12 | S1 on Zb1;
Y with S1;
%Between C_CN%
Y on Xb2;
Y S1 S2 S12 on Zb2;
Y with S1 S2 S12;
S1 with S2 S12;
S2 with S12;
OUTPUT: SAMPSTAT TECH1 TECH8;
 Bengt O. Muthen posted on Monday, January 22, 2018 - 10:49 am
Please send your full output to Support along with your license number.
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: