title:
Introducing Multilevel Modeling by Kreft and de Leeuw.
Page 89, Table 4.17
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 white ses meanses;
within = homework white ses; ! level 1 variables here
between = meanses; ! level 2 variables here
analysis:
type = twolevel random;
estimator = ml;
model:
%within%
math on white ses; ! fixed effect of white and ses
b1 | math on homework; ! random effect of homework
%between%
math on meanses; ! intercept predicted from meanses
b1 ; ! no predictors of homework slope
math with b1; ! covariance intercept and slope