title:
Introducing Multilevel Modeling by Kreft and de Leeuw.
Page 77, Table 4.10
data:
file = imm23.dat ;
variable:
names = schid stuid ses meanses homework white parented public
ratio percmin math sex race sctype cstr scsize urban region;
cluster = schid;
usevar = math homework public;
within = homework; ! level 1 variables here
between = public; ! level 2 variables here
analysis:
type = twolevel random;
estimator = ml;
model:
%within%
math; ! no fixed effects
b1 | math on homework; ! random slope for homework
%between%
math on public; ! intercept predicted by public
b1 on public; ! slope predicted by public
math with b1; ! covariance of intercept and slope