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

INPUT INSTRUCTIONS

  TITLE:	this is an example of a two-level confirmatory factor analysis (CFA)
  	with continuous factor indicators,
  	covariates, and a factor with a random residual variance
  DATA:	FILE = ex9.29.dat;
  VARIABLE:	NAMES ARE y1-y4 x1 x2 w clus;
  	WITHIN = x1 x2;
  	BETWEEN = w;
  	CLUSTER = clus;
  ANALYSIS:	TYPE = TWOLEVEL RANDOM;
  	ESTIMATOR = BAYES;
  	PROCESSORS = 2;
  	BITERATIONS = (10000);
  MODEL:	%WITHIN%
  	fw BY y1-y4;
  	fw ON x1 x2;
  	logv | fw;
  	%BETWEEN%
  	fb BY y1-y4;
  	fb ON w;
  	logv ON w;
  OUTPUT:	TECH1 TECH8;
  PLOT:	TYPE = PLOT3;



INPUT READING TERMINATED NORMALLY



this is an example of a two-level confirmatory factor analysis (CFA)
with continuous factor indicators,
covariates, and a factor with a random residual variance

SUMMARY OF ANALYSIS

Number of groups                                                 1
Number of observations                                        1000

Number of dependent variables                                    4
Number of independent variables                                  3
Number of continuous latent variables                            3

Observed dependent variables

  Continuous
   Y1          Y2          Y3          Y4

Observed independent variables
   X1          X2          W

Continuous latent variables
   FW          FB          LOGV

Variables with special functions

  Cluster variable      CLUS

  Within variables
   X1          X2

  Between variables
   W


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.29.dat
Input data format  FREE


SUMMARY OF DATA

     Number of clusters                        110

       Size (s)    Cluster ID with Size s

          5        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
         10        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
         15        91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
                   107 108 109 110




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

     Y1                   -0.191       0.259      -5.793    0.10%      -1.750     -0.712     -0.244
            1000.000       3.539       0.296       6.579    0.10%       0.205      1.311
     Y2                   -0.140       0.159      -7.127    0.10%      -1.888     -0.744     -0.192
            1000.000       4.098       0.243       7.313    0.10%       0.369      1.555
     Y3                   -0.219      -0.006      -6.025    0.10%      -1.930     -0.750     -0.175
            1000.000       3.804       0.001       6.523    0.10%       0.329      1.429
     Y4                   -0.142       0.166      -5.993    0.10%      -1.863     -0.723     -0.170
            1000.000       3.911      -0.045       7.001    0.10%       0.341      1.537
     X1                   -0.054       0.034      -3.052    0.10%      -0.870     -0.330     -0.053
            1000.000       0.961      -0.036       2.855    0.10%       0.180      0.750
     X2                    0.035       0.060      -3.093    0.10%      -0.821     -0.239      0.038
            1000.000       0.996      -0.226       2.959    0.10%       0.286      0.913
     W                    -0.165       0.246      -2.091    0.91%      -0.796     -0.285     -0.187
             110.000       0.676       1.163       2.584    0.91%      -0.013      0.439


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                              25

Information Criteria

          Deviance (DIC)                        13113.698
          Estimated Number of Parameters (pD)     269.080



MODEL RESULTS

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

Within Level

 FW       BY
    Y1                 1.000       0.000      0.000       1.000       1.000
    Y2                 1.076       0.036      0.000       1.008       1.149      *
    Y3                 1.060       0.035      0.000       0.993       1.131      *
    Y4                 1.038       0.035      0.000       0.971       1.108      *

 FW         ON
    X1                 0.970       0.040      0.000       0.892       1.049      *
    X2                 0.433       0.035      0.000       0.364       0.502      *

 Residual Variances
    Y1                 0.998       0.059      0.000       0.887       1.121      *
    Y2                 0.982       0.061      0.000       0.869       1.110      *
    Y3                 0.932       0.058      0.000       0.823       1.052      *
    Y4                 1.022       0.062      0.000       0.907       1.150      *

Between Level

 FB       BY
    Y1                 1.000       0.000      0.000       1.000       1.000
    Y2                 1.298       0.159      0.000       1.029       1.656      *
    Y3                 1.200       0.145      0.000       0.963       1.516      *
    Y4                 1.213       0.162      0.000       0.942       1.578      *

 FB         ON
    W                  0.483       0.083      0.000       0.324       0.652      *

 LOGV       ON
    W                  0.399       0.087      0.000       0.224       0.569      *

 Intercepts
    Y1                -0.073       0.071      0.159      -0.205       0.075
    Y2                 0.017       0.081      0.412      -0.140       0.181
    Y3                -0.075       0.075      0.164      -0.218       0.079
    Y4                 0.021       0.083      0.403      -0.139       0.188
    LOGV              -0.127       0.079      0.043      -0.294       0.016

 Residual Variances
    Y1                 0.104       0.040      0.000       0.034       0.193      *
    Y2                 0.138       0.048      0.000       0.059       0.247      *
    Y3                 0.056       0.034      0.000       0.007       0.136      *
    Y4                 0.190       0.054      0.000       0.102       0.319      *
    FB                 0.196       0.057      0.000       0.108       0.328      *
    LOGV               0.077       0.061      0.000       0.010       0.248      *


TECHNICAL 1 OUTPUT


     PARAMETER SPECIFICATION FOR WITHIN


           NU
              Y1            Y2            Y3            Y4            X1
              ________      ________      ________      ________      ________
                    0             0             0             0             0


           NU
              X2
              ________
                    0


           LAMBDA
              FW            X1            X2
              ________      ________      ________
 Y1                 0             0             0
 Y2                 1             0             0
 Y3                 2             0             0
 Y4                 3             0             0
 X1                 0             0             0
 X2                 0             0             0


           THETA
              Y1            Y2            Y3            Y4            X1
              ________      ________      ________      ________      ________
 Y1                 4
 Y2                 0             5
 Y3                 0             0             6
 Y4                 0             0             0             7
 X1                 0             0             0             0             0
 X2                 0             0             0             0             0


           THETA
              X2
              ________
 X2                 0


           ALPHA
              FW            X1            X2
              ________      ________      ________
                    0             0             0


           BETA
              FW            X1            X2
              ________      ________      ________
 FW                 0             8             9
 X1                 0             0             0
 X2                 0             0             0


           PSI
              FW            X1            X2
              ________      ________      ________
 FW                 0
 X1                 0             0
 X2                 0             0             0


     PARAMETER SPECIFICATION FOR BETWEEN


           NU
              Y1            Y2            Y3            Y4            W
              ________      ________      ________      ________      ________
                   10            11            12            13             0


           LAMBDA
              FB            LOGV          W
              ________      ________      ________
 Y1                 0             0             0
 Y2                14             0             0
 Y3                15             0             0
 Y4                16             0             0
 W                  0             0             0


           THETA
              Y1            Y2            Y3            Y4            W
              ________      ________      ________      ________      ________
 Y1                17
 Y2                 0            18
 Y3                 0             0            19
 Y4                 0             0             0            20
 W                  0             0             0             0             0


           ALPHA
              FB            LOGV          W
              ________      ________      ________
                    0            21             0


           BETA
              FB            LOGV          W
              ________      ________      ________
 FB                 0             0            22
 LOGV               0             0            23
 W                  0             0             0


           PSI
              FB            LOGV          W
              ________      ________      ________
 FB                24
 LOGV               0            25
 W                  0             0             0


     STARTING VALUES FOR WITHIN


           NU
              Y1            Y2            Y3            Y4            X1
              ________      ________      ________      ________      ________
                0.000         0.000         0.000         0.000         0.000


           NU
              X2
              ________
                0.000


           LAMBDA
              FW            X1            X2
              ________      ________      ________
 Y1             1.000         0.000         0.000
 Y2             1.000         0.000         0.000
 Y3             1.000         0.000         0.000
 Y4             1.000         0.000         0.000
 X1             0.000         1.000         0.000
 X2             0.000         0.000         1.000


           THETA
              Y1            Y2            Y3            Y4            X1
              ________      ________      ________      ________      ________
 Y1             1.770
 Y2             0.000         2.049
 Y3             0.000         0.000         1.902
 Y4             0.000         0.000         0.000         1.956
 X1             0.000         0.000         0.000         0.000         0.000
 X2             0.000         0.000         0.000         0.000         0.000


           THETA
              X2
              ________
 X2             0.000


           ALPHA
              FW            X1            X2
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              FW            X1            X2
              ________      ________      ________
 FW             0.000         0.000         0.000
 X1             0.000         0.000         0.000
 X2             0.000         0.000         0.000


           PSI
              FW            X1            X2
              ________      ________      ________
 FW             0.000
 X1             0.000         0.481
 X2             0.000         0.000         0.498


     STARTING VALUES FOR BETWEEN


           NU
              Y1            Y2            Y3            Y4            W
              ________      ________      ________      ________      ________
               -0.191        -0.140        -0.219        -0.142         0.000


           LAMBDA
              FB            LOGV          W
              ________      ________      ________
 Y1             1.000         0.000         0.000
 Y2             1.000         0.000         0.000
 Y3             1.000         0.000         0.000
 Y4             1.000         0.000         0.000
 W              0.000         0.000         1.000


           THETA
              Y1            Y2            Y3            Y4            W
              ________      ________      ________      ________      ________
 Y1             1.770
 Y2             0.000         2.049
 Y3             0.000         0.000         1.902
 Y4             0.000         0.000         0.000         1.956
 W              0.000         0.000         0.000         0.000         0.000


           ALPHA
              FB            LOGV          W
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              FB            LOGV          W
              ________      ________      ________
 FB             0.000         0.000         0.000
 LOGV           0.000         0.000         0.000
 W              0.000         0.000         0.000


           PSI
              FB            LOGV          W
              ________      ________      ________
 FB             1.000
 LOGV           0.000         1.000
 W              0.000         0.000         0.329



     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~IG(-1.000,0.000)          infinity            infinity            infinity
     Parameter 5~IG(-1.000,0.000)          infinity            infinity            infinity
     Parameter 6~IG(-1.000,0.000)          infinity            infinity            infinity
     Parameter 7~IG(-1.000,0.000)          infinity            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~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 20~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 21~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 22~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 23~N(0.000,infinity)          0.0000            infinity            infinity
     Parameter 24~IG(-1.000,0.000)         infinity            infinity            infinity
     Parameter 25~IG(-1.000,0.000)         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 21    0.1900    0.0470
     Parameter 14    0.1300    0.3439
     Parameter 12    0.1100    0.5560
     Parameter 23    0.1000    0.6766
     Parameter 8    0.0900    0.7942
     Parameter 2    0.0900    0.7942
     Parameter 25    0.0900    0.7942
     Parameter 11    0.0800    0.8938
     Parameter 1    0.0800    0.8938
     Parameter 5    0.0800    0.8938
     Parameter 15    0.0700    0.9610
     Parameter 16    0.0700    0.9610
     Parameter 4    0.0600    0.9921
     Parameter 6    0.0600    0.9921
     Parameter 7    0.0600    0.9921
     Parameter 18    0.0600    0.9921
     Parameter 10    0.0500    0.9995
     Parameter 9    0.0500    0.9995
     Parameter 13    0.0500    0.9995
     Parameter 3    0.0400    1.0000
     Parameter 24    0.0400    1.0000
     Parameter 22    0.0400    1.0000
     Parameter 17    0.0300    1.0000
     Parameter 20    0.0200    1.0000
     Parameter 19    0.0100    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
     Parameter 23 Improper Prior
     Parameter 24 Improper Prior
     Parameter 25 Improper Prior


   TECHNICAL 8 OUTPUT FOR BAYES ESTIMATION

     CHAIN    BSEED
     1        0
     2        285380

                     POTENTIAL       PARAMETER WITH
     ITERATION    SCALE REDUCTION      HIGHEST PSR
     100              5.464               23
     200              2.608               21
     300              3.835               25
     400              3.377               23
     500              2.521               25
     600              1.687               21
     700              1.568               21
     800              1.440               21
     900              1.496               21
     1000             1.537               21
     1100             1.740               23
     1200             2.014               23
     1300             2.013               23
     1400             1.939               23
     1500             2.012               23
     1600             1.876               23
     1700             1.625               21
     1800             1.629               21
     1900             1.518               21
     2000             1.402               21
     2100             1.311               21
     2200             1.282               21
     2300             1.281               21
     2400             1.284               21
     2500             1.270               21
     2600             1.191               21
     2700             1.149               21
     2800             1.179               25
     2900             1.245               25
     3000             1.290               25
     3100             1.321               25
     3200             1.297               25
     3300             1.266               25
     3400             1.243               25
     3500             1.173               25
     3600             1.121               25
     3700             1.078               25
     3800             1.045               25
     3900             1.036               25
     4000             1.026               25
     4100             1.015               16
     4200             1.018               16
     4300             1.016               16
     4400             1.010               16
     4500             1.011               16
     4600             1.016               16
     4700             1.020               21
     4800             1.018               19
     4900             1.011               19
     5000             1.009               19
     5100             1.010               19
     5200             1.021               25
     5300             1.042               25
     5400             1.056               25
     5500             1.080               25
     5600             1.097               25
     5700             1.115               25
     5800             1.139               25
     5900             1.189               25
     6000             1.229               25
     6100             1.266               25
     6200             1.270               25
     6300             1.250               25
     6400             1.223               25
     6500             1.214               25
     6600             1.199               25
     6700             1.175               25
     6800             1.174               25
     6900             1.166               25
     7000             1.147               25
     7100             1.120               25
     7200             1.103               25
     7300             1.092               25
     7400             1.079               25
     7500             1.063               25
     7600             1.050               25
     7700             1.038               25
     7800             1.025               25
     7900             1.023               25
     8000             1.019               25
     8100             1.016               25
     8200             1.013               25
     8300             1.011               25
     8400             1.008               25
     8500             1.006               25
     8600             1.003               24
     8700             1.003               24
     8800             1.006               21
     8900             1.013               25
     9000             1.023               25
     9100             1.033               25
     9200             1.041               25
     9300             1.039               25
     9400             1.036               25
     9500             1.035               25
     9600             1.031               25
     9700             1.024               25
     9800             1.018               25
     9900             1.018               25
     10000            1.018               25


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:03:16
        Ending Time:  05:03:49
       Elapsed Time:  00:00:33



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