TITLE: this is an example of a two-level time series analysis
with a univariate first-order autoregressive AR(1) model
for a continuous dependent variable with a random intercept,
random AR(1) slope, and random residual variance
DATA: FILE = ex9.30.dat;
VARIABLE: NAMES = z y w time subject;
BETWEEN = z w;
CLUSTER = subject;
LAGGED = y(1);
TINTERVAL = time (1);
ANALYSIS: TYPE = TWOLEVEL RANDOM;
ESTIMATOR = BAYES;
PROCESSORS = 2;
BITERATIONS = (2000);
MODEL: %WITHIN%
s | y ON y&1;
logv | y;
%BETWEEN%
y ON w;
s ON w;
logv ON w;
y s logv WITH y s logv;
z ON y s logv;
OUTPUT: TECH1 TECH8 FSCOMPARISON;
PLOT: TYPE = PLOT3;
FACTORS = ALL;