TITLE: this is an example of a two-level MIMIC with
continuous factor indicators, random factor loadings,
two covariates on within, and one covariate on between
montecarlo:
names are y1-y4 x1 x2 w;
nobservations = 1000;
nreps = 1;
ncsizes = 3;
CSIZES = 40(5) 50(10) 20(15);
save = ex9.19.dat;
WITHIN = x1 x2;
BETWEEN = w;
ANALYSIS: TYPE = TWOLEVEL RANDOM;
estimator = bayes;
proc = 2;
MODEL POPULATION:
%WITHIN%
x1-x2@1;
s1-s4 | f by y1-y4;
[f@0]; f@1;
f ON x1*.8 x2*.4;
y1-y4*1;
%BETWEEN%
w@1;
f*.4;
[f@0];
y1-y4*.5;
[y1-y4*.5];
s1-s4*.3;
[s1-s4*1];
f ON w*.6;
MODEL:
%WITHIN%
! x1-x2@1;
s1-s4 | f by y1-y4;
[f@0]; f@1;
f ON x1*.8 x2*.4;
y1-y4*1;
%BETWEEN%
! w@1;
f*.4;
[f@0];
y1-y4*.5;
[y1-y4*.5];
s1-s4*.3;
[s1-s4*1];
f ON w*.6;
output:
tech8 tech9;