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