title:
monte carlo for two-level LCA with categorical
latent class indicators
montecarlo:
names are u1-u6 x w;
nobservations = 1000;
ncsizes = 3;
csizes = 40 (5) 50 (10) 20 (15);
generate = u1-u6(1);
categorical = u1-u6;
genclasses = c(3);
classes = c(3);
within = x;
between = w;
seed = 3454367;
nrep = 1;
save = ex10.6.dat;
analysis:
type = twolevel mixture;
model population:
%within%
%overall%
x*1;
[x*0];
[c#1*0 c#2*0];
c#1 on x*1;
c#2 on x*2;
%between%
%overall%
[w@0]; w@1;
f by c#1@1 c#2*1.5;
f on w*.8;
f*.5;
u1-u6@0;
%c#1%
[u1$1-u6$1*-1];
%c#2%
[u1$1-u3$1*-1 u4$1-u6$1*1];
%c#3%
[u1$1-u6$1*1];
model:
%within%
%overall%
[c#1*0 c#2*0];
c#1 on x*1;
c#2 on x*2;
%between%
%overall%
f by c#1@1 c#2*1.5;
f on w*.8;
f*.5;
u1-u6@0;
%c#1%
[u1$1-u6$1*-1];
%c#2%
[u1$1-u3$1*-1 u4$1-u6$1*1];
%c#3%
[u1$1-u6$1*1];
output:
tech8 tech9;