Mplus VERSION 8
MUTHEN & MUTHEN
04/10/2017   5:02 AM

INPUT INSTRUCTIONS

  TITLE:	this is an example of a two-level regression analysis
      for a continuous dependent variable
      with a random intercept and a random residual variance
  DATA:	FILE = ex9.28.dat;
  VARIABLE:	NAMES ARE z y x w xm clus;
  	WITHIN = x;
  	BETWEEN = w xm z;
  	CLUSTER = clus;
  ANALYSIS:	TYPE = TWOLEVEL RANDOM;
  	ESTIMATOR = BAYES;
  	PROCESSORS = 2;
   	BITERATIONS = (2000);
  MODEL:	%WITHIN%
  	y ON x;
  	logv | y;
  	%BETWEEN%
  	y ON w xm;
  	logv ON w xm;
  	y WITH logv;
  	z ON y logv;
  OUTPUT:	TECH1 TECH8;
  PLOT:	TYPE = PLOT3;




INPUT READING TERMINATED NORMALLY



this is an example of a 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 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

  Cluster variable      CLUS

  Within variables
   X

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

Input data file(s)
  ex9.28.dat
Input data format  FREE


SUMMARY OF DATA

     Number of clusters                        200

       Size (s)    Cluster ID with Size s

        100        1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
                   22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
                   40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
                   58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
                   76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
                   94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
                   109 110 111 112 113 114 115 116 117 118 119 120 121
                   122 123 124 125 126 127 128 129 130 131 132 133 134
                   135 136 137 138 139 140 141 142 143 144 145 146 147
                   148 149 150 151 152 153 154 155 156 157 158 159 160
                   161 162 163 164 165 166 167 168 169 170 171 172 173
                   174 175 176 177 178 179 180 181 182 183 184 185 186
                   187 188 189 190 191 192 193 194 195 196 197 198 199
                   200




UNIVARIATE SAMPLE STATISTICS


     UNIVARIATE HIGHER-ORDER MOMENT DESCRIPTIVE STATISTICS

         Variable/         Mean/     Skewness/   Minimum/ % with                Percentiles
        Sample Size      Variance    Kurtosis    Maximum  Min/Max      20%/60%    40%/80%    Median

     Z                     0.043      -0.013      -3.110    0.50%      -1.077     -0.311      0.057
             200.000       1.383      -0.305       2.977    0.50%       0.343      1.082
     Y                     0.080       0.285      -5.353    0.01%      -1.173     -0.361      0.027
           20000.000       2.293       0.391       8.110    0.01%       0.391      1.297
     X                     0.007      -0.007      -3.973    0.01%      -0.843     -0.259      0.004
           20000.000       1.014      -0.022       4.334    0.01%       0.265      0.859
     W                     0.051      -0.192      -3.215    0.50%      -0.895     -0.100      0.062
             200.000       1.084      -0.195       2.401    0.50%       0.282      1.033
     XM                    0.032      -0.024      -2.607    0.50%      -0.708     -0.229      0.009
             200.000       0.870      -0.155       2.155    0.50%       0.211      0.906


THE MODEL ESTIMATION TERMINATED NORMALLY

     USE THE FBITERATIONS OPTION TO INCREASE THE NUMBER OF ITERATIONS BY A FACTOR
     OF AT LEAST TWO TO CHECK CONVERGENCE AND THAT THE PSR VALUE DOES NOT INCREASE.



MODEL FIT INFORMATION

Number of Free Parameters                              14

Information Criteria

          Deviance (DIC)                        58003.531
          Estimated Number of Parameters (pD)     347.288



MODEL RESULTS

                                Posterior  One-Tailed         95% C.I.
                    Estimate       S.D.      P-Value   Lower 2.5%  Upper 2.5%  Significance

Within Level

 Y          ON
    X                  0.699       0.007      0.000       0.686       0.712      *

Between Level

 LOGV       ON
    W                  0.315       0.023      0.000       0.271       0.361      *
    XM                 0.089       0.026      0.000       0.038       0.142      *

 Z          ON
    LOGV               0.131       0.287      0.317      -0.444       0.675

 Y          ON
    W                  0.551       0.040      0.000       0.473       0.629      *
    XM                 0.298       0.044      0.000       0.218       0.385      *

 Z          ON
    Y                  0.722       0.153      0.000       0.424       1.028      *

 Y        WITH
    LOGV               0.099       0.016      0.000       0.072       0.134      *

 Intercepts
    Z                 -0.012       0.070      0.418      -0.154       0.121
    Y                  0.039       0.040      0.170      -0.040       0.118
    LOGV              -0.002       0.025      0.472      -0.053       0.049

 Residual Variances
    Z                  0.986       0.101      0.000       0.817       1.213      *
    Y                  0.303       0.032      0.000       0.251       0.373      *
    LOGV               0.100       0.012      0.000       0.079       0.128      *


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.000
 X              0.000         0.000


           PSI
              Y             X
              ________      ________
 Y              0.000
 X              0.000         0.507


     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.043         0.080         0.000         0.000


           BETA
              LOGV          Z             Y             W             XM
              ________      ________      ________      ________      ________
 LOGV           0.000         0.000         0.000         0.000         0.000
 Z              0.000         0.000         0.000         0.000         0.000
 Y              0.000         0.000         0.000         0.000         0.000
 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           1.000
 Z              0.000         0.692
 Y              0.000         0.000         1.146
 W              0.000         0.000         0.000         0.542
 XM             0.000         0.000         0.000         0.000         0.435



     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



     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 6    0.0500    0.9995
     Parameter 4    0.0400    1.0000
     Parameter 9    0.0400    1.0000
     Parameter 12    0.0400    1.0000
     Parameter 5    0.0200    1.0000
     Parameter 13    0.0100    1.0000
     Parameter 1    0.0100    1.0000
     Parameter 11    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

                     POTENTIAL       PARAMETER WITH
     ITERATION    SCALE REDUCTION      HIGHEST PSR
     100              1.085               7
     200              1.009               13
     300              1.021               8
     400              1.009               5
     500              1.009               7
     600              1.014               7
     700              1.005               10
     800              1.009               5
     900              1.005               2
     1000             1.006               5
     1100             1.005               13
     1200             1.003               13
     1300             1.003               2
     1400             1.005               11
     1500             1.004               11
     1600             1.000               9
     1700             1.000               13
     1800             1.003               13
     1900             1.004               13
     2000             1.005               13


PLOT INFORMATION

The following plots are available:

  Histograms (sample values)
  Scatterplots (sample values)
  Between-level histograms (sample values, sample means/variances)
  Between-level scatterplots (sample values, sample means/variances)
  Bayesian posterior parameter distributions
  Bayesian posterior parameter trace plots
  Bayesian autocorrelation plots

     Beginning Time:  05:02:56
        Ending Time:  05:03:16
       Elapsed Time:  00:00:20



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