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;
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;