Mplus VERSION 8
MUTHEN & MUTHEN
04/10/2017   3:32 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
  MONTECARLO:
  	NAMES ARE y1-y4 x1 x2 w;
  	NOBSERVATIONS = 1000;
  	NCSIZES = 3;
  	CSIZES = 40 (5) 50 (10) 20 (15);
  	SEED = 58459;
  	NREPS = 1;
  	WITHIN = x1 x2;
  	BETWEEN = w;
      SAVE = ex9.29.dat;
  MODEL POPULATION:
  	%WITHIN%
  	x1-x2@1;
  	fw BY y1@1
  	y2*1
  	y3*1
  	y4*1;
  	fw ON x1*1 x2*.5;
  	y1-y4*1;
      logv | fw;
  	%BETWEEN%
  	[w@0]; w@.7;
  	fb BY y1@1
  	y2*1
  	y3*1
  	y4*1;
  	fb ON w*.5;
  	fb*.4;
  	y1-y4*.1;
      logv ON w*.3;
      [logv*0]; logv*.1;
  ANALYSIS:	
  	TYPE = TWOLEVEL RANDOM;
      ESTIMATOR = BAYES;
      PROCESSORS = 2;
      BITERATIONS = (10000);
  MODEL:	
  	%WITHIN%
      fw BY y1@1
  	y2*1
  	y3*1
  	y4*1;
  	fw ON x1*1 x2*.5;
  	y1-y4*1;
      logv | fw;
  	%BETWEEN%
  	fb BY y1@1
  	y2*1
  	y3*1
  	y4*1;
  	fb ON w*.5;
  	fb*.4;
  	y1-y4*.1;
      logv ON w*.3;
      [logv*0]; logv*.1;
  OUTPUT:
  	TECH8;



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 replications
    Requested                                                    1
    Completed                                                    1
Value of seed                                                58459

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

  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


SUMMARY OF DATA FOR THE FIRST REPLICATION

     Cluster information

       Size (s)    Number of clusters of Size s

          5            40
         10            50
         15            20





MODEL FIT INFORMATION

Number of Free Parameters                       25

Information Criteria

    Deviance (DIC)

        Mean                             13116.455
        Std Dev                              0.000
        Number of successful computations        1

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

    Estimated Number of Parameters (pD)

        Mean                               269.545
        Std Dev                              0.000
        Number of successful computations        1

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



MODEL RESULTS

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

 FW       BY
  Y1                  1.000     1.0000     0.0000     0.0000     0.0000 1.000 0.000
  Y2                  1.000     1.0754     0.0000     0.0355     0.0057 0.000 1.000
  Y3                  1.000     1.0587     0.0000     0.0348     0.0034 1.000 1.000
  Y4                  1.000     1.0371     0.0000     0.0350     0.0014 1.000 1.000

 FW         ON
  X1                  1.000     0.9707     0.0000     0.0399     0.0009 1.000 1.000
  X2                  0.500     0.4343     0.0000     0.0350     0.0043 1.000 1.000

 Residual Variances
  Y1                  1.000     0.9973     0.0000     0.0593     0.0000 1.000 1.000
  Y2                  1.000     0.9816     0.0000     0.0611     0.0003 1.000 1.000
  Y3                  1.000     0.9316     0.0000     0.0584     0.0047 1.000 1.000
  Y4                  1.000     1.0228     0.0000     0.0617     0.0005 1.000 1.000

Between Level

 FB       BY
  Y1                  1.000     1.0000     0.0000     0.0000     0.0000 1.000 0.000
  Y2                  1.000     1.2973     0.0000     0.1601     0.0884 0.000 1.000
  Y3                  1.000     1.2002     0.0000     0.1458     0.0401 1.000 1.000
  Y4                  1.000     1.2146     0.0000     0.1626     0.0460 1.000 1.000

 FB         ON
  W                   0.500     0.4822     0.0000     0.0832     0.0003 1.000 1.000

 LOGV       ON
  W                   0.300     0.3947     0.0000     0.0811     0.0090 1.000 1.000

 Intercepts
  Y1                  0.000    -0.0730     0.0000     0.0710     0.0053 1.000 0.000
  Y2                  0.000     0.0162     0.0000     0.0820     0.0003 1.000 0.000
  Y3                  0.000    -0.0759     0.0000     0.0750     0.0058 1.000 0.000
  Y4                  0.000     0.0201     0.0000     0.0834     0.0004 1.000 0.000
  LOGV                0.000    -0.1193     0.0000     0.0772     0.0142 1.000 0.000

 Residual Variances
  Y1                  0.100     0.1036     0.0000     0.0403     0.0000 1.000 1.000
  Y2                  0.100     0.1384     0.0000     0.0483     0.0015 1.000 1.000
  Y3                  0.100     0.0566     0.0000     0.0339     0.0019 1.000 1.000
  Y4                  0.100     0.1895     0.0000     0.0545     0.0080 0.000 1.000
  FB                  0.400     0.1956     0.0000     0.0566     0.0418 0.000 1.000
  LOGV                0.100     0.0667     0.0000     0.0568     0.0011 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.
  FB                  0.866       0.000              0.382       0.000
  LOGV                0.653       0.000              0.319       0.000
  Y1                  0.868       0.000              0.408       0.000
  Y2                  0.878       0.000              0.402       0.000
  Y3                  0.861       0.000              0.412       0.000
  Y4                  0.841       0.000              0.461       0.000


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.000
 Y2             0.000         1.000
 Y3             0.000         0.000         1.000
 Y4             0.000         0.000         0.000         1.000
 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         1.000         0.500
 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.500
 X2             0.000         0.000         0.500


     STARTING VALUES FOR BETWEEN


           NU
              Y1            Y2            Y3            Y4            W
              ________      ________      ________      ________      ________
                0.000         0.000         0.000         0.000         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             0.100
 Y2             0.000         0.100
 Y3             0.000         0.000         0.100
 Y4             0.000         0.000         0.000         0.100
 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.500
 LOGV           0.000         0.000         0.300
 W              0.000         0.000         0.000


           PSI
              FB            LOGV          W
              ________      ________      ________
 FB             0.400
 LOGV           0.000         0.100
 W              0.000         0.000         0.500


     POPULATION 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.000
 Y2             0.000         1.000
 Y3             0.000         0.000         1.000
 Y4             0.000         0.000         0.000         1.000
 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         1.000         0.500
 X1             0.000         0.000         0.000
 X2             0.000         0.000         0.000


           PSI
              FW            X1            X2
              ________      ________      ________
 FW             0.000
 X1             0.000         1.000
 X2             0.000         0.000         1.000


     POPULATION VALUES FOR BETWEEN


           NU
              Y1            Y2            Y3            Y4            W
              ________      ________      ________      ________      ________
                0.000         0.000         0.000         0.000         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             0.100
 Y2             0.000         0.100
 Y3             0.000         0.000         0.100
 Y4             0.000         0.000         0.000         0.100
 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.500
 LOGV           0.000         0.000         0.300
 W              0.000         0.000         0.000


           PSI
              FB            LOGV          W
              ________      ________      ________
 FB             0.400
 LOGV           0.000         0.100
 W              0.000         0.000         0.700



     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

     REPLICATION 1:



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





     Parameter   KS Statistic P-value
     Parameter 25    0.1700    0.0994
     Parameter 20    0.1000    0.6766
     Parameter 7    0.1000    0.6766
     Parameter 22    0.0900    0.7942
     Parameter 13    0.0900    0.7942
     Parameter 16    0.0900    0.7942
     Parameter 14    0.0800    0.8938
     Parameter 5    0.0700    0.9610
     Parameter 23    0.0700    0.9610
     Parameter 12    0.0700    0.9610
     Parameter 15    0.0700    0.9610
     Parameter 21    0.0600    0.9921
     Parameter 4    0.0500    0.9995
     Parameter 17    0.0500    0.9995
     Parameter 6    0.0500    0.9995
     Parameter 10    0.0500    0.9995
     Parameter 18    0.0400    1.0000
     Parameter 2    0.0400    1.0000
     Parameter 11    0.0300    1.0000
     Parameter 8    0.0300    1.0000
     Parameter 24    0.0200    1.0000
     Parameter 19    0.0200    1.0000
     Parameter 9    0.0200    1.0000
     Parameter 3    0.0100    1.0000
     Parameter 1    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

     REPLICATION 1:


                     POTENTIAL       PARAMETER WITH
     ITERATION    SCALE REDUCTION      HIGHEST PSR
     100              2.761               23
     200              1.505               25
     300              1.878               21
     400              2.598               25
     500              3.001               25
     600              2.635               25
     700              2.204               25
     800              1.928               21
     900              1.876               21
     1000             1.824               21
     1100             1.732               21
     1200             1.638               25
     1300             1.721               21
     1400             1.607               21
     1500             1.589               23
     1600             1.492               21
     1700             1.396               21
     1800             1.359               21
     1900             1.241               21
     2000             1.186               21
     2100             1.138               21
     2200             1.141               21
     2300             1.137               21
     2400             1.105               21
     2500             1.079               21
     2600             1.102               25
     2700             1.116               25
     2800             1.157               25
     2900             1.218               25
     3000             1.271               25
     3100             1.262               25
     3200             1.203               25
     3300             1.110               25
     3400             1.065               25
     3500             1.057               12
     3600             1.057               10
     3700             1.042               10
     3800             1.027               10
     3900             1.018               10
     4000             1.018               10
     4100             1.014               16
     4200             1.016               16
     4300             1.019               25
     4400             1.022               25
     4500             1.029               25
     4600             1.037               25
     4700             1.046               25
     4800             1.053               25
     4900             1.053               25
     5000             1.073               23
     5100             1.083               23
     5200             1.095               23
     5300             1.116               25
     5400             1.133               25
     5500             1.159               25
     5600             1.182               25
     5700             1.234               25
     5800             1.292               25
     5900             1.361               25
     6000             1.393               25
     6100             1.395               25
     6200             1.328               25
     6300             1.285               25
     6400             1.261               25
     6500             1.243               25
     6600             1.231               25
     6700             1.208               25
     6800             1.208               25
     6900             1.203               25
     7000             1.197               25
     7100             1.194               25
     7200             1.198               25
     7300             1.214               25
     7400             1.229               25
     7500             1.238               25
     7600             1.254               25
     7700             1.263               25
     7800             1.241               25
     7900             1.230               25
     8000             1.217               25
     8100             1.198               25
     8200             1.180               25
     8300             1.173               25
     8400             1.167               25
     8500             1.156               25
     8600             1.146               25
     8700             1.137               25
     8800             1.131               25
     8900             1.116               25
     9000             1.106               25
     9100             1.096               25
     9200             1.080               25
     9300             1.080               25
     9400             1.079               25
     9500             1.072               25
     9600             1.072               25
     9700             1.076               25
     9800             1.085               25
     9900             1.088               25
     10000            1.091               25
     10100            1.088               25
     10200            1.080               25


SAVEDATA INFORMATION

  Order of variables

    Y1
    Y2
    Y3
    Y4
    X1
    X2
    W
    CLUSTER

  Save file
    ex9.29.dat

  Save file format           Free
  Save file record length    10000


     Beginning Time:  03:32:58
        Ending Time:  03:33:27
       Elapsed Time:  00:00:29



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