TITLE: this is an example of a two-level growth
model for a continuous outcome (three-
level analysis) with variation on both the
within and between levels for a random
slope of a time-varying covariate
DATA: FILE IS ex9.14.dat;
VARIABLE: NAMES ARE y1-y4 x a1-a4 w clus;
WITHIN = x a1-a4;
BETWEEN = w;
CLUSTER = clus;
ANALYSIS: TYPE = TWOLEVEL RANDOM;
ALGORITHM = INTEGRATION;
INTEGRATION = 10;
MODEL:
%WITHIN%
iw sw | y1@0 y2@1 y3@2 y4@3;
y1-y4 (1);
iw sw ON x;
s* | y1 ON a1;
s* | y2 ON a2;
s* | y3 ON a3;
s* | y4 ON a4;
%BETWEEN%
ib sb | y1@0 y2@1 y3@2 y4@3;
y1-y4@0;
ib sb s ON w;
OUTPUT: TECH1 TECH8;