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

INPUT INSTRUCTIONS

  Title:      this is an example of two-level regression
  	        analysis for a continuous dependent
  	        variable with a random intercept and a random residual
              variance
  MONTECARLO:  NAMES ARE y x w xm z;
               NOBS = 20000;
               NREP = 1;
               NCSIZES = 1;
               CSIZES = 200(100);
               WITHIN = x;
               BETWEEN = w xm z;
               SAVE = ex9.28.dat;
  MODEL POPULATION:
              %WITHIN%
              x*1;
              y ON x*.7;
              logv | y;
              %BETWEEN%
              w-z*1;
              y*0.3;
              [logv*0]; logv*.1;
              y ON w*.5 xm*.3;
              logv ON w*.3 xm*.1;
              y WITH logv*.1;
              z ON y*.5 logv*.2;
  ANALYSIS:   TYPE = TWOLEVEL RANDOM;
      		ESTIMATOR = BAYES;
               PROCESSORS = 2;
              BITERATIONS = (2000);
  MODEL:
              %WITHIN%
              y ON x*.7;
              logv | y;
              %BETWEEN%
              y*0.3;
              [logv*0]; logv*.1;
              y ON w*.5 xm*.3;
              logv ON w*.3 xm*.1;
              y WITH logv*.1;
              z ON y*.5 logv*.2;
  OUTPUT:
              TECH8;



INPUT READING TERMINATED NORMALLY



this is an example of two-level regression
analysis for a continuous dependent
variable with a random intercept and a random residual
variance

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                                    2
Number of independent variables                                  3
Number of continuous latent variables                            1

Observed dependent variables

  Continuous
   Z           Y

Observed independent variables
   X           W           XM

Continuous latent variables
   LOGV

Variables with special functions

  Within variables
   X

  Between variables
   W           XM          Z


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)
  Convergence criterion                                  0.500D-01
  Maximum number of iterations                               50000
  K-th iteration used for thinning                               1


SUMMARY OF DATA FOR THE FIRST REPLICATION

     Cluster information

       Size (s)    Number of clusters of Size s

        100           200





MODEL FIT INFORMATION

Number of Free Parameters                       14

Information Criteria

    Deviance (DIC)

        Mean                             58003.515
        Std Dev                              0.000
        Number of successful computations        1

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

    Estimated Number of Parameters (pD)

        Mean                               347.547
        Std Dev                              0.000
        Number of successful computations        1

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



MODEL RESULTS

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

 Y          ON
  X                   0.700     0.6995     0.0000     0.0067     0.0000 1.000 1.000

Between Level

 LOGV       ON
  W                   0.300     0.3149     0.0000     0.0231     0.0002 1.000 1.000
  XM                  0.100     0.0893     0.0000     0.0262     0.0001 1.000 1.000

 Z          ON
  LOGV                0.200     0.1222     0.0000     0.2913     0.0060 1.000 0.000

 Y          ON
  W                   0.500     0.5509     0.0000     0.0397     0.0026 1.000 1.000
  XM                  0.300     0.2979     0.0000     0.0436     0.0000 1.000 1.000

 Z          ON
  Y                   0.500     0.7245     0.0000     0.1549     0.0504 1.000 1.000

 Y        WITH
  LOGV                0.100     0.0992     0.0000     0.0163     0.0000 1.000 1.000

 Intercepts
  Z                   0.000    -0.0122     0.0000     0.0697     0.0002 1.000 0.000
  Y                   0.000     0.0393     0.0000     0.0402     0.0015 1.000 0.000
  LOGV                0.000    -0.0013     0.0000     0.0249     0.0000 1.000 0.000

 Residual Variances
  Z                   0.500     0.9861     0.0000     0.1013     0.2363 0.000 1.000
  Y                   0.300     0.3027     0.0000     0.0323     0.0000 1.000 1.000
  LOGV                0.100     0.1000     0.0000     0.0122     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.
  LOGV                0.960       0.000              0.127       0.000
  Y                   0.992       0.000              0.102       0.000


TECHNICAL 1 OUTPUT


     PARAMETER SPECIFICATION FOR WITHIN


           NU
              Y             X
              ________      ________
                    0             0


           LAMBDA
              Y             X
              ________      ________
 Y                  0             0
 X                  0             0


           THETA
              Y             X
              ________      ________
 Y                  0
 X                  0             0


           ALPHA
              Y             X
              ________      ________
                    0             0


           BETA
              Y             X
              ________      ________
 Y                  0             1
 X                  0             0


           PSI
              Y             X
              ________      ________
 Y                  0
 X                  0             0


     PARAMETER SPECIFICATION FOR BETWEEN


           NU
              Z             Y             W             XM
              ________      ________      ________      ________
                    0             0             0             0


           LAMBDA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 Z                  0             0             0             0             0
 Y                  0             0             0             0             0
 W                  0             0             0             0             0
 XM                 0             0             0             0             0


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


           ALPHA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
                    2             3             4             0             0


           BETA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 LOGV               0             0             0             5             6
 Z                  7             0             8             0             0
 Y                  0             0             0             9            10
 W                  0             0             0             0             0
 XM                 0             0             0             0             0


           PSI
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 LOGV              11
 Z                  0            12
 Y                 13             0            14
 W                  0             0             0             0
 XM                 0             0             0             0             0


     STARTING VALUES FOR WITHIN


           NU
              Y             X
              ________      ________
                0.000         0.000


           LAMBDA
              Y             X
              ________      ________
 Y              1.000         0.000
 X              0.000         1.000


           THETA
              Y             X
              ________      ________
 Y              0.000
 X              0.000         0.000


           ALPHA
              Y             X
              ________      ________
                0.000         0.000


           BETA
              Y             X
              ________      ________
 Y              0.000         0.700
 X              0.000         0.000


           PSI
              Y             X
              ________      ________
 Y              0.000
 X              0.000         0.500


     STARTING VALUES FOR BETWEEN


           NU
              Z             Y             W             XM
              ________      ________      ________      ________
                0.000         0.000         0.000         0.000


           LAMBDA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 Z              0.000         1.000         0.000         0.000         0.000
 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
              Z             Y             W             XM
              ________      ________      ________      ________
 Z              0.000
 Y              0.000         0.000
 W              0.000         0.000         0.000
 XM             0.000         0.000         0.000         0.000


           ALPHA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
                0.000         0.000         0.000         0.000         0.000


           BETA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 LOGV           0.000         0.000         0.000         0.300         0.100
 Z              0.200         0.000         0.500         0.000         0.000
 Y              0.000         0.000         0.000         0.500         0.300
 W              0.000         0.000         0.000         0.000         0.000
 XM             0.000         0.000         0.000         0.000         0.000


           PSI
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 LOGV           0.100
 Z              0.000         0.500
 Y              0.100         0.000         0.300
 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
              ________      ________
                0.000         0.000


           LAMBDA
              Y             X
              ________      ________
 Y              1.000         0.000
 X              0.000         1.000


           THETA
              Y             X
              ________      ________
 Y              0.000
 X              0.000         0.000


           ALPHA
              Y             X
              ________      ________
                0.000         0.000


           BETA
              Y             X
              ________      ________
 Y              0.000         0.700
 X              0.000         0.000


           PSI
              Y             X
              ________      ________
 Y              0.000
 X              0.000         1.000


     POPULATION VALUES FOR BETWEEN


           NU
              Z             Y             W             XM
              ________      ________      ________      ________
                0.000         0.000         0.000         0.000


           LAMBDA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 Z              0.000         1.000         0.000         0.000         0.000
 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
              Z             Y             W             XM
              ________      ________      ________      ________
 Z              0.000
 Y              0.000         0.000
 W              0.000         0.000         0.000
 XM             0.000         0.000         0.000         0.000


           ALPHA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
                0.000         0.000         0.000         0.000         0.000


           BETA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 LOGV           0.000         0.000         0.000         0.300         0.100
 Z              0.200         0.000         0.500         0.000         0.000
 Y              0.000         0.000         0.000         0.500         0.300
 W              0.000         0.000         0.000         0.000         0.000
 XM             0.000         0.000         0.000         0.000         0.000


           PSI
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 LOGV           0.100
 Z              0.000         1.000
 Y              0.100         0.000         0.300
 W              0.000         0.000         0.000         1.000
 XM             0.000         0.000         0.000         0.000         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~N(0.000,infinity)           0.0000            infinity            infinity
     Parameter 3~N(0.000,infinity)           0.0000            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~IW(0.000,-3)             infinity            infinity            infinity
     Parameter 12~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 13~IW(0.000,-3)             infinity            infinity            infinity
     Parameter 14~IW(0.000,-3)             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.1100    0.5560
     Parameter 7    0.0900    0.7942
     Parameter 10    0.0800    0.8938
     Parameter 14    0.0700    0.9610
     Parameter 3    0.0700    0.9610
     Parameter 2    0.0500    0.9995
     Parameter 12    0.0500    0.9995
     Parameter 4    0.0400    1.0000
     Parameter 9    0.0400    1.0000
     Parameter 6    0.0400    1.0000
     Parameter 5    0.0100    1.0000
     Parameter 13    0.0100    1.0000
     Parameter 11    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


   TECHNICAL 8 OUTPUT FOR BAYES ESTIMATION

     CHAIN    BSEED
     1        0
     2        285380

     REPLICATION 1:


                     POTENTIAL       PARAMETER WITH
     ITERATION    SCALE REDUCTION      HIGHEST PSR
     100              1.101               7
     200              1.006               12
     300              1.017               8
     400              1.026               5
     500              1.006               5
     600              1.009               7
     700              1.006               5
     800              1.012               5
     900              1.007               13
     1000             1.008               5
     1100             1.006               13
     1200             1.003               13
     1300             1.003               11
     1400             1.007               11
     1500             1.004               11
     1600             1.001               9
     1700             1.000               13
     1800             1.003               13
     1900             1.003               13
     2000             1.005               13


SAVEDATA INFORMATION

  Order of variables

    Z
    Y
    X
    W
    XM
    CLUSTER

  Save file
    ex9.28.dat

  Save file format           Free
  Save file record length    10000


     Beginning Time:  03:32:41
        Ending Time:  03:32:58
       Elapsed Time:  00:00:17



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