TITLE: this is an example of a two-level random
first-order autoregressive AR(1) confirmatory factor
analysis (CFA) with continuous factor indicators,
random indicator intercepts, random residual factor variance,
and a between-level factor
montecarlo:
names are y1-y4;
NOBS = 20000;
NREP = 1;
NCSIZES = 1;
CSIZES = 200(100);
save = ex9.34.dat;
ANALYSIS:
TYPE = TWOLEVEL RANDOM;
estimator=bayes;
biter=(2000);
proc=2;
model population:
%within%
f by y1@1 y2-y4*1(&1);
y1-y4*.5;
logv | f;
s | f on f&1;
%between%
fb BY y1-y4*.7;
fb@1;
y1-y4*.3;
[logv*0]; logv*.01;
[s*0.3]; s*.02;
model:
%within%
f by y1@1 y2-y4*1(&1);
y1-y4*.5;
logv | f;
s | f on f&1;
%between%
fb BY y1-y4*.7;
fb@1;
y1-y4*.3;
[logv*0]; logv*.01;
[s*0.3]; s*.02;
output:
tech8 tech9;