Mplus VERSION 8
MUTHEN & MUTHEN
04/10/2017   3:57 AM

INPUT INSTRUCTIONS

  TITLE:	this is an example of a cross-classified time series analysis
          with a univariate first-order autoregressive AR(1) model for a
          continuous dependent variable with a covariate, linear trend, and random slope
          Same as mcex9.38
  Montecarlo:
  		names are y x w xm;
  		nobservations = 20000;
  		nreps = 1;
  		CSIZES = 200[100(1)];
  		ncsize = 1[1];
          lagged = y(1);
          Between = (level2b)w (level2b)xm;
          within = x;
          save = ex9.39.dat;

  ANALYSIS:  TYPE = CROSS random;
  		estimator=bayes; process=2;
          fbiter = 200; ! full convergence not needed to generate the data

  model population:
  		%within%
          sx | y ON x;
          sy | y ON y&1;
  		y*1; x*1;

  		%between LEVEL2A%  ! time
          y*.5; sx*.2; sy@0;

  		%between LEVEL2B%  ! subject
  		y*.5; [y*2];
          w*1; xm*1;
          w with xm*.5;
          [sx*.5]; sx*.2;
          [sy*.3]; sy*.02;
          y on w*.3 xm*.4;
          sx on w*.2 xm*.3;
          sy on w*.05 xm*.05;

  model:
         %within%
          sx | y ON x;
          sy | y ON y&1;
  		y*1; x*1;
  		%between LEVEL2A%  ! time
          y*.5; sx*.2; sy@0; ! random AR over time takes a long time

  		%between LEVEL2B%  ! subject
  		y*.5; [y*2];
          w*1; xm*1;
          w with xm*.5;
          [sx*.5]; sx*.2;
          [sy*.3]; sy*.02;
          y on w*.3 xm*.4;
          sx on w*.2 xm*.3;
          sy on w*.05 xm*.05;

  output: tech8 tech9;



INPUT READING TERMINATED NORMALLY



this is an example of a cross-classified time series analysis
with a univariate first-order autoregressive AR(1) model for a
continuous dependent variable with a covariate, linear trend, and random slope
Same as mcex9.38

SUMMARY OF ANALYSIS

Number of groups                                                 1
Number of observations                                       20000

Number of replications
    Requested                                                    1
    Completed                                                    1
Value of seed                                                    0

Number of dependent variables                                    1
Number of independent variables                                  4
Number of continuous latent variables                            2

Observed dependent variables

  Continuous
   Y

Observed independent variables
   X           W           XM          Y&1

Continuous latent variables
   SX          SY

Variables with special functions

  Within variables
   X           Y&1

  Level 2b between variables
   W           XM


Estimator                                                    BAYES
Specifications for Bayesian Estimation
  Point estimate                                            MEDIAN
  Number of Markov chain Monte Carlo (MCMC) chains               2
  Random seed for the first chain                                0
  Starting value information                           UNPERTURBED
  Treatment of categorical mediator                         LATENT
  Algorithm used for Markov chain Monte Carlo           GIBBS(PX1)
  Fixed number of iterations                                   200
  K-th iteration used for thinning                               1


SUMMARY OF DATA FOR THE FIRST REPLICATION

     Cluster information

     Number of level 2a clusters          100
     Number of level 2b clusters          200






MODEL FIT INFORMATION

Number of Free Parameters                       22

Information Criteria

    Deviance (DIC)

        Mean                            114463.038
        Std Dev                              0.000
        Number of successful computations        1

             Proportions                   Percentiles
        Expected    Observed         Expected       Observed
           0.990       0.000       114463.038     114463.038
           0.980       0.000       114463.038     114463.038
           0.950       0.000       114463.038     114463.038
           0.900       0.000       114463.038     114463.038
           0.800       0.000       114463.038     114463.038
           0.700       0.000       114463.038     114463.038
           0.500       0.000       114463.038     114463.038
           0.300       0.000       114463.038     114463.038
           0.200       0.000       114463.038     114463.038
           0.100       0.000       114463.038     114463.038
           0.050       0.000       114463.038     114463.038
           0.020       0.000       114463.038     114463.038
           0.010       0.000       114463.038     114463.038

    Estimated Number of Parameters (pD)

        Mean                               760.591
        Std Dev                              0.000
        Number of successful computations        1

             Proportions                   Percentiles
        Expected    Observed         Expected       Observed
           0.990       0.000          760.591        760.591
           0.980       0.000          760.591        760.591
           0.950       0.000          760.591        760.591
           0.900       0.000          760.591        760.591
           0.800       0.000          760.591        760.591
           0.700       0.000          760.591        760.591
           0.500       0.000          760.591        760.591
           0.300       0.000          760.591        760.591
           0.200       0.000          760.591        760.591
           0.100       0.000          760.591        760.591
           0.050       0.000          760.591        760.591
           0.020       0.000          760.591        760.591
           0.010       0.000          760.591        760.591



MODEL RESULTS

                              ESTIMATES              S. E.     M. S. E.  95%  % Sig
                 Population   Average   Std. Dev.   Average             Cover Coeff
Within Level

 Means
  X                   0.000    -0.0038     0.0000     0.0068     0.0000 1.000 0.000

 Variances
  X                   1.000     0.9929     0.0000     0.0091     0.0001 1.000 1.000

 Residual Variances
  Y                   1.000     1.0150     0.0000     0.0100     0.0002 1.000 1.000

Between LEVEL2A Level

 Variances
  Y                   0.500     0.5024     0.0000     0.0700     0.0000 1.000 1.000
  SX                  0.200     0.1857     0.0000     0.0248     0.0002 1.000 1.000
  SY                  0.000     0.0000     0.0000     0.0000     0.0000 1.000 0.000

Between LEVEL2B Level

 SX         ON
  W                   0.200     0.2355     0.0000     0.0350     0.0013 1.000 1.000
  XM                  0.300     0.2710     0.0000     0.0320     0.0008 1.000 1.000

 SY         ON
  W                   0.050     0.0745     0.0000     0.0116     0.0006 0.000 1.000
  XM                  0.050     0.0346     0.0000     0.0112     0.0002 1.000 1.000

 Y          ON
  W                   0.300     0.3186     0.0000     0.0510     0.0003 1.000 1.000
  XM                  0.400     0.4338     0.0000     0.0547     0.0011 1.000 1.000

 W        WITH
  XM                  0.500     0.5761     0.0000     0.0982     0.0058 1.000 1.000

 Means
  W                   0.000    -0.0659     0.0000     0.0814     0.0043 1.000 0.000
  XM                  0.000    -0.0685     0.0000     0.0808     0.0047 1.000 0.000

 Intercepts
  Y                   2.000     2.0397     0.0000     0.0664     0.0016 1.000 1.000
  SX                  0.500     0.5650     0.0000     0.0466     0.0042 1.000 1.000
  SY                  0.300     0.3246     0.0000     0.0111     0.0006 0.000 1.000

 Variances
  W                   1.000     1.1255     0.0000     0.1198     0.0157 1.000 1.000
  XM                  1.000     1.1720     0.0000     0.1241     0.0296 1.000 1.000

 Residual Variances
  Y                   0.500     0.5223     0.0000     0.0571     0.0005 1.000 1.000
  SX                  0.200     0.2049     0.0000     0.0199     0.0000 1.000 1.000
  SY                  0.020     0.0173     0.0000     0.0023     0.0000 1.000 1.000


CORRELATIONS AND MEAN SQUARE ERROR OF THE TRUE FACTOR VALUES AND THE FACTOR SCORES

                        CORRELATIONS                MEAN SQUARE ERROR
                    Average    Std. Dev.           Average    Std. Dev.
  SX%2a               0.986       0.000              0.070       0.000
  SY%2a               0.000       0.000              0.034       0.000
  SX%2b               0.989       0.000              0.099       0.000
  SY%2b               0.910       0.000              0.066       0.000
  B2a_Y               0.994       0.000              0.088       0.000
  B2b_Y               0.988       0.000              0.169       0.000


TECHNICAL 1 OUTPUT


     PARAMETER SPECIFICATION FOR WITHIN


           NU
              Y             X             Y&1
              ________      ________      ________
                    0             0             0


           LAMBDA
              Y             X             Y&1
              ________      ________      ________
 Y                  0             0             0
 X                  0             0             0
 Y&1                0             0             0


           THETA
              Y             X             Y&1
              ________      ________      ________
 Y                  0
 X                  0             0
 Y&1                0             0             0


           ALPHA
              Y             X             Y&1
              ________      ________      ________
                    0             1             0


           BETA
              Y             X             Y&1
              ________      ________      ________
 Y                  0             0             0
 X                  0             0             0
 Y&1                0             0             0


           PSI
              Y             X             Y&1
              ________      ________      ________
 Y                  2
 X                  0             3
 Y&1                0             0             0


     PARAMETER SPECIFICATION FOR BETWEEN LEVEL2A


           NU
              Y
              ________
                    0


           LAMBDA
              SX%2a         SY%2a         Y
              ________      ________      ________
 Y                  0             0             0


           THETA
              Y
              ________
 Y                  0


           ALPHA
              SX%2a         SY%2a         Y
              ________      ________      ________
                    0             0             0


           BETA
              SX%2a         SY%2a         Y
              ________      ________      ________
 SX%2a              0             0             0
 SY%2a              0             0             0
 Y                  0             0             0


           PSI
              SX%2a         SY%2a         Y
              ________      ________      ________
 SX%2a              4
 SY%2a              0             0
 Y                  0             0             5


     PARAMETER SPECIFICATION FOR BETWEEN LEVEL2B


           NU
              W             XM            Y
              ________      ________      ________
                    0             0             0


           LAMBDA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 W                  0             0             0             0             0
 XM                 0             0             0             0             0
 Y                  0             0             0             0             0


           THETA
              W             XM            Y
              ________      ________      ________
 W                  0
 XM                 0             0
 Y                  0             0             0


           ALPHA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
                    6             7             8             9            10


           BETA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 SX%2b              0             0            11            12             0
 SY%2b              0             0            13            14             0
 W                  0             0             0             0             0
 XM                 0             0             0             0             0
 Y                  0             0            15            16             0


           PSI
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 SX%2b             17
 SY%2b              0            18
 W                  0             0            19
 XM                 0             0            20            21
 Y                  0             0             0             0            22


     STARTING VALUES FOR WITHIN


           NU
              Y             X             Y&1
              ________      ________      ________
                0.000         0.000         0.000


           LAMBDA
              Y             X             Y&1
              ________      ________      ________
 Y              1.000         0.000         0.000
 X              0.000         1.000         0.000
 Y&1            0.000         0.000         1.000


           THETA
              Y             X             Y&1
              ________      ________      ________
 Y              0.000
 X              0.000         0.000
 Y&1            0.000         0.000         0.000


           ALPHA
              Y             X             Y&1
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              Y             X             Y&1
              ________      ________      ________
 Y              0.000         0.000         0.000
 X              0.000         0.000         0.000
 Y&1            0.000         0.000         0.000


           PSI
              Y             X             Y&1
              ________      ________      ________
 Y              1.000
 X              0.000         1.000
 Y&1            0.000         0.000         0.500


     STARTING VALUES FOR BETWEEN LEVEL2A


           NU
              Y
              ________
                0.000


           LAMBDA
              SX%2a         SY%2a         Y
              ________      ________      ________
 Y              0.000         0.000         1.000


           THETA
              Y
              ________
 Y              0.000


           ALPHA
              SX%2a         SY%2a         Y
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              SX%2a         SY%2a         Y
              ________      ________      ________
 SX%2a          0.000         0.000         0.000
 SY%2a          0.000         0.000         0.000
 Y              0.000         0.000         0.000


           PSI
              SX%2a         SY%2a         Y
              ________      ________      ________
 SX%2a          0.200
 SY%2a          0.000         0.000
 Y              0.000         0.000         0.500


     STARTING VALUES FOR BETWEEN LEVEL2B


           NU
              W             XM            Y
              ________      ________      ________
                0.000         0.000         0.000


           LAMBDA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 W              0.000         0.000         1.000         0.000         0.000
 XM             0.000         0.000         0.000         1.000         0.000
 Y              0.000         0.000         0.000         0.000         1.000


           THETA
              W             XM            Y
              ________      ________      ________
 W              0.000
 XM             0.000         0.000
 Y              0.000         0.000         0.000


           ALPHA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
                0.500         0.300         0.000         0.000         2.000


           BETA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 SX%2b          0.000         0.000         0.200         0.300         0.000
 SY%2b          0.000         0.000         0.050         0.050         0.000
 W              0.000         0.000         0.000         0.000         0.000
 XM             0.000         0.000         0.000         0.000         0.000
 Y              0.000         0.000         0.300         0.400         0.000


           PSI
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 SX%2b          0.200
 SY%2b          0.000         0.020
 W              0.000         0.000         1.000
 XM             0.000         0.000         0.500         1.000
 Y              0.000         0.000         0.000         0.000         0.500


     POPULATION VALUES FOR WITHIN


           NU
              Y             X             Y&1
              ________      ________      ________
                0.000         0.000         0.000


           LAMBDA
              Y             X             Y&1
              ________      ________      ________
 Y              1.000         0.000         0.000
 X              0.000         1.000         0.000
 Y&1            0.000         0.000         1.000


           THETA
              Y             X             Y&1
              ________      ________      ________
 Y              0.000
 X              0.000         0.000
 Y&1            0.000         0.000         0.000


           ALPHA
              Y             X             Y&1
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              Y             X             Y&1
              ________      ________      ________
 Y              0.000         0.000         0.000
 X              0.000         0.000         0.000
 Y&1            0.000         0.000         0.000


           PSI
              Y             X             Y&1
              ________      ________      ________
 Y              1.000
 X              0.000         1.000
 Y&1            0.000         0.000         1.000


     POPULATION VALUES FOR BETWEEN LEVEL2A


           NU
              Y
              ________
                0.000


           LAMBDA
              SX%2a         SY%2a         Y
              ________      ________      ________
 Y              0.000         0.000         1.000


           THETA
              Y
              ________
 Y              0.000


           ALPHA
              SX%2a         SY%2a         Y
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              SX%2a         SY%2a         Y
              ________      ________      ________
 SX%2a          0.000         0.000         0.000
 SY%2a          0.000         0.000         0.000
 Y              0.000         0.000         0.000


           PSI
              SX%2a         SY%2a         Y
              ________      ________      ________
 SX%2a          0.200
 SY%2a          0.000         0.000
 Y              0.000         0.000         0.500


     POPULATION VALUES FOR BETWEEN LEVEL2B


           NU
              W             XM            Y
              ________      ________      ________
                0.000         0.000         0.000


           LAMBDA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 W              0.000         0.000         1.000         0.000         0.000
 XM             0.000         0.000         0.000         1.000         0.000
 Y              0.000         0.000         0.000         0.000         1.000


           THETA
              W             XM            Y
              ________      ________      ________
 W              0.000
 XM             0.000         0.000
 Y              0.000         0.000         0.000


           ALPHA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
                0.500         0.300         0.000         0.000         2.000


           BETA
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 SX%2b          0.000         0.000         0.200         0.300         0.000
 SY%2b          0.000         0.000         0.050         0.050         0.000
 W              0.000         0.000         0.000         0.000         0.000
 XM             0.000         0.000         0.000         0.000         0.000
 Y              0.000         0.000         0.300         0.400         0.000


           PSI
              SX%2b         SY%2b         W             XM            Y
              ________      ________      ________      ________      ________
 SX%2b          0.200
 SY%2b          0.000         0.020
 W              0.000         0.000         1.000
 XM             0.000         0.000         0.500         1.000
 Y              0.000         0.000         0.000         0.000         0.500



     PRIORS FOR ALL PARAMETERS            PRIOR MEAN      PRIOR VARIANCE     PRIOR STD. DEV.

     Parameter 1~N(0.000,infinity)           0.0000            infinity            infinity
     Parameter 2~IG(-1.000,0.000)          infinity            infinity            infinity
     Parameter 3~IG(-1.000,0.000)          infinity            infinity            infinity
     Parameter 4~IG(-1.000,0.000)          infinity            infinity            infinity
     Parameter 5~IG(-1.000,0.000)          infinity            infinity            infinity
     Parameter 6~N(0.000,infinity)           0.0000            infinity            infinity
     Parameter 7~N(0.000,infinity)           0.0000            infinity            infinity
     Parameter 8~N(0.000,infinity)           0.0000            infinity            infinity
     Parameter 9~N(0.000,infinity)           0.0000            infinity            infinity
     Parameter 10~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 11~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 12~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 13~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 14~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 15~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 16~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 17~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 18~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 19~IW(0.000,-3)             infinity            infinity            infinity
     Parameter 20~IW(0.000,-3)             infinity            infinity            infinity
     Parameter 21~IW(0.000,-3)             infinity            infinity            infinity
     Parameter 22~IG(-1.000,0.000)         infinity            infinity            infinity


TECHNICAL 8 OUTPUT

     REPLICATION 1:



     Kolmogorov-Smirnov comparing posterior distributions across chains 1 and 2 using 100 draws.





     Parameter   KS Statistic P-value
     Parameter 5    0.1300    0.3439
     Parameter 10    0.1200    0.4431
     Parameter 20    0.1200    0.4431
     Parameter 9    0.1100    0.5560
     Parameter 21    0.1100    0.5560
     Parameter 19    0.0900    0.7942
     Parameter 15    0.0900    0.7942
     Parameter 11    0.0600    0.9921
     Parameter 8    0.0600    0.9921
     Parameter 16    0.0500    0.9995
     Parameter 22    0.0500    0.9995
     Parameter 6    0.0400    1.0000
     Parameter 12    0.0400    1.0000
     Parameter 17    0.0200    1.0000
     Parameter 13    0.0100    1.0000
     Parameter 4    0.0100    1.0000
     Parameter 3    0.0000    1.0000
     Parameter 2    0.0000    1.0000
     Parameter 14    0.0000    1.0000
     Parameter 7    0.0000    1.0000
     Parameter 18    0.0000    1.0000
     Parameter 1    0.0000    1.0000



     Simulated prior distributions

     Parameter       Prior Mean  Prior Variance  Prior Std. Dev.


     Parameter 1 Improper Prior
     Parameter 2 Improper Prior
     Parameter 3 Improper Prior
     Parameter 4 Improper Prior
     Parameter 5 Improper Prior
     Parameter 6 Improper Prior
     Parameter 7 Improper Prior
     Parameter 8 Improper Prior
     Parameter 9 Improper Prior
     Parameter 10 Improper Prior
     Parameter 11 Improper Prior
     Parameter 12 Improper Prior
     Parameter 13 Improper Prior
     Parameter 14 Improper Prior
     Parameter 15 Improper Prior
     Parameter 16 Improper Prior
     Parameter 17 Improper Prior
     Parameter 18 Improper Prior
     Parameter 19 Improper Prior
     Parameter 20 Improper Prior
     Parameter 21 Improper Prior
     Parameter 22 Improper Prior


   TECHNICAL 8 OUTPUT FOR BAYES ESTIMATION

     CHAIN    BSEED
     1        0
     2        285380

     REPLICATION 1:


                     POTENTIAL       PARAMETER WITH
     ITERATION    SCALE REDUCTION      HIGHEST PSR
     100              1.372               6
     200              1.045               13


TECHNICAL 9 OUTPUT

  Error messages for each replication (if any)



SAVEDATA INFORMATION

  Order of variables

    W
    XM
    Y
    X
    LEVEL2A
    LEVEL2B
    Y&1

  Save file
    ex9.39.dat

  Save file format           Free
  Save file record length    10000


     Beginning Time:  03:57:15
        Ending Time:  04:03:07
       Elapsed Time:  00:05:52



MUTHEN & MUTHEN
3463 Stoner Ave.
Los Angeles, CA  90066

Tel: (310) 391-9971
Fax: (310) 391-8971
Web: www.StatModel.com
Support: Support@StatModel.com

Copyright (c) 1998-2017 Muthen & Muthen

Back to examples