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

INPUT INSTRUCTIONS

  TITLE:      two-level time series analysis with a univariate first-order autoregressive AR
           for a continuous dependent variable with a covariate, linear trend, random slopes
           and a random residual variance
           Set up as a cross-classified model with empty Level2A (time) model
  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.37.dat;

  ANALYSIS:  TYPE = CROSS random;
  		estimator=bayes; process=2;
          fbiter = (100); ! doesn't need to go to convergence to generate the data

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

  		%between LEVEL2A%  ! time
  		! empty
          y@0; sx@0; 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
  		! empty
          y@0; sx@0; sy@0;

  		%between LEVEL2B%  ! subject
  		y*.5; [y*2];
          [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;



*** WARNING
  Input line exceeded 90 characters. Some input may be truncated.
  TITLE:      two-level time series analysis with a univariate first-order autoregressive AR(
*** WARNING
  Input line exceeded 90 characters. Some input may be truncated.
           for a continuous dependent variable with a covariate, linear trend, random slopes,
   2 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS



two-level time series analysis with a univariate first-order autoregressive AR(
for a continuous dependent variable with a covariate, linear trend, random slopes
and a random residual variance
Set up as a cross-classified model with empty Level2A (time) model

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                                   100
  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                       15

Information Criteria

    Deviance (DIC)

        Mean                            114255.205
        Std Dev                              0.000
        Number of successful computations        1

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

    Estimated Number of Parameters (pD)

        Mean                               563.322
        Std Dev                              0.000
        Number of successful computations        1

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



MODEL RESULTS

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

 Means
  X                   0.000    -0.0041     0.0000     0.0071     0.0000 1.000 0.000

 Variances
  X                   1.000     0.9913     0.0000     0.0096     0.0001 1.000 1.000

 Residual Variances
  Y                   1.000     1.0182     0.0000     0.0096     0.0003 1.000 1.000

Between LEVEL2A Level

 Variances
  Y                   0.000     0.0000     0.0000     0.0000     0.0000 1.000 0.000
  SX                  0.000     0.0000     0.0000     0.0000     0.0000 1.000 0.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.2360     0.0000     0.0366     0.0013 1.000 1.000
  XM                  0.300     0.2726     0.0000     0.0372     0.0008 1.000 1.000

 SY         ON
  W                   0.050     0.0739     0.0000     0.0115     0.0006 1.000 1.000
  XM                  0.050     0.0309     0.0000     0.0118     0.0004 1.000 1.000

 Y          ON
  W                   0.300     0.3213     0.0000     0.0559     0.0005 1.000 1.000
  XM                  0.400     0.4354     0.0000     0.0609     0.0012 1.000 1.000

 Intercepts
  Y                   2.000     2.0022     0.0000     0.0523     0.0000 1.000 1.000
  SX                  0.500     0.5225     0.0000     0.0344     0.0005 1.000 1.000
  SY                  0.300     0.3244     0.0000     0.0101     0.0006 0.000 1.000

 Residual Variances
  Y                   0.500     0.5256     0.0000     0.0553     0.0007 1.000 1.000
  SX                  0.200     0.2033     0.0000     0.0207     0.0000 1.000 1.000
  SY                  0.020     0.0170     0.0000     0.0022     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.000       0.000              0.029       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.904       0.000              0.068       0.000
  B2a_Y               0.404       0.000              0.028       0.000
  B2b_Y               0.988       0.000              0.154       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              0
 SY%2a              0             0
 Y                  0             0             0


     PARAMETER SPECIFICATION FOR BETWEEN LEVEL2B


           NU
              Y             W             XM
              ________      ________      ________
                    0             0             0


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


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


           ALPHA
              SX%2b         SY%2b         Y             W             XM
              ________      ________      ________      ________      ________
                    4             5             6             0             0


           BETA
              SX%2b         SY%2b         Y             W             XM
              ________      ________      ________      ________      ________
 SX%2b              0             0             0             7             8
 SY%2b              0             0             0             9            10
 Y                  0             0             0            11            12
 W                  0             0             0             0             0
 XM                 0             0             0             0             0


           PSI
              SX%2b         SY%2b         Y             W             XM
              ________      ________      ________      ________      ________
 SX%2b             13
 SY%2b              0            14
 Y                  0             0            15
 W                  0             0             0             0
 XM                 0             0             0             0             0


     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.000
 SY%2a          0.000         0.000
 Y              0.000         0.000         0.000


     STARTING VALUES FOR BETWEEN LEVEL2B


           NU
              Y             W             XM
              ________      ________      ________
                0.000         0.000         0.000


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


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


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


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


           PSI
              SX%2b         SY%2b         Y             W             XM
              ________      ________      ________      ________      ________
 SX%2b          0.200
 SY%2b          0.000         0.020
 Y              0.000         0.000         0.500
 W              0.000         0.000         0.000         0.500
 XM             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.000
 SY%2a          0.000         0.000
 Y              0.000         0.000         0.000


     POPULATION VALUES FOR BETWEEN LEVEL2B


           NU
              Y             W             XM
              ________      ________      ________
                0.000         0.000         0.000


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


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


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


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


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



     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~N(0.000,infinity)           0.0000            infinity            infinity
     Parameter 5~N(0.000,infinity)           0.0000            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~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 14~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 15~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 8    0.1000    0.6766
     Parameter 15    0.0600    0.9921
     Parameter 11    0.0500    0.9995
     Parameter 4    0.0500    0.9995
     Parameter 12    0.0500    0.9995
     Parameter 6    0.0400    1.0000
     Parameter 7    0.0300    1.0000
     Parameter 13    0.0100    1.0000
     Parameter 9    0.0100    1.0000
     Parameter 5    0.0100    1.0000
     Parameter 3    0.0000    1.0000
     Parameter 2    0.0000    1.0000
     Parameter 14    0.0000    1.0000
     Parameter 10    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


   TECHNICAL 8 OUTPUT FOR BAYES ESTIMATION

     CHAIN    BSEED
     1        0
     2        285380

     REPLICATION 1:


                     POTENTIAL       PARAMETER WITH
     ITERATION    SCALE REDUCTION      HIGHEST PSR
     100              1.118               6
     200              1.009               2


TECHNICAL 9 OUTPUT

  Error messages for each replication (if any)



SAVEDATA INFORMATION

  Order of variables

    Y
    X
    W
    XM
    LEVEL2A
    LEVEL2B
    Y&1

  Save file
    ex9.37.dat

  Save file format           Free
  Save file record length    10000


     Beginning Time:  03:45:55
        Ending Time:  03:51:29
       Elapsed Time:  00:05:34



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