title: this is an example of a cross-classified time
series analysis with a first-order
autoregressive AR(1) confirmatory factor
analysis (CFA) model for continuous factor
indicators with random intercepts, random
factor loadings, and a factor varying across
both subjects and time
montecarlo:
names are y1-y3;
nobservations = 20000;
nreps = 1;
CSIZES = 200[100(1)]; ! 200 subjects (2b), 100 time points (2a)
ncsize = 1[1];
save = ex9.40.dat;
ANALYSIS: TYPE = cross;
estimator = bayes;
proc = 2;
biter = (2000);
model population:
%within%
y1-y3*1.2; [y1-y3@0];
f by y1-y3*1.3 (&1 1-3);
f@1;
f on f&1*.3;
%between level2b%
! across subject variation in measurement intercepts
! and factor
fsubj by y1-y3*1.3 (1-3);
fsubj*1;
y1-y3*.5;
[y1-y3*1]; ! estimating the intercepts on the level with most
! intercept variance
%between level2a%
! across time variation of measurement intercepts and factor
ftime by y1-y3*1.3 (1-3);
ftime*0.5;
y1-y3*.3;
model:
%within%
y1-y3*1.2; [y1-y3@0];
f by y1-y3*1.3 (&1 1-3);
f@1;
f on f&1*.3;
%between level2b%
! across subject variation in measurement intercepts
! and factor
fsubj by y1-y3*1.3 (1-3);
fsubj*1;
y1-y3*.5;
[y1-y3*1]; ! estimating the intercepts on the level with most
! intercept variance
%between level2a%
! across time variation of measurement intercepts and factor
ftime by y1-y3*1.3 (1-3);
ftime*0.5;
y1-y3*.3;
output:
tech8;