Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022  10:26 PM

INPUT INSTRUCTIONS

  title:  this is an example of 3-level regression

  montecarlo:
  		names are y x w z;
  		nobservations = 7500;
  		nreps = 1;
  		CSIZES = 50[30(5)];
  		ncsize = 1[1];
  		within = x;
  		between =(level2) w (level3) z;
          cutpoints = w(0);
          save = ex9.20.dat;

  ANALYSIS:  TYPE = threelevel random;

  model population:
  		%within%
          x@1;
  		s1 | y on x;
          y*1;
  		%between level2%
          w@1;
  		s2 | y on w;
          y*.6;
          s12 | s1 on w;
          s1*.4;
          y with s1*.3;

  		%between level3%
          z@1;
  		y on z*.6;
          y*.4;
          [y*.5];
          s1 on z*.2;
          s1*.4;
          [s1*.4];
          s2 on z*.3;
          s2*.4;
          [s2*.7];
          s12 on z*.2;
          s12*.5;
          [s12*.4];
          y with s1*.2;
          y with s2*.1;
          y with s12*0;
          s1 with s2*.2;



  model:
  		%within%
          s1 | y on x;
          y*1;
  		%between level2%

  		s2 | y on w;
          y*.6;
          s12 | s1 on w;
          s1*.4;
          y with s1*.3;

  		%between level3%

  		y on z*.6;
          y*.4;
          [y*.5];
          s1 on z*.2;
          s1*.4;
          [s1*.4];
          s2 on z*.3;
          s2*.4;
          [s2*.7];
          s12 on z*.2;
          s12*.5;
          [s12*.4];
          y with s1*.2;
          y with s2*.1;
          y with s12*0;
          s1 with s2*.2;
          s1 with s12*0;
          s2 with s12*0;
  output:
      	tech9;



*** WARNING in MODEL command
  In the MODEL command, the predictor variable refers to the whole observed variable
  in the following statement(s):
    S2 | Y ON W
*** WARNING in MODEL POPULATION command
  In the MODEL POPULATION command, the predictor variable refers to the whole observed variable
  in the following statement(s):
    S2 | Y ON W
   2 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS



this is an example of 3-level regression

SUMMARY OF ANALYSIS

Number of groups                                                 1
Number of observations                                        7500

Number of replications
    Requested                                                    1
    Completed                                                    1
Value of seed                                                    0

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

Observed dependent variables

  Continuous
   Y

Observed independent variables
   X           W           Z

Continuous latent variables
   S1          S2          S12

Variables with special functions

  Within variables
   X

  Level 2 between variables
   W

  Level 3 between variables
   Z


Estimator                                                      MLR
Information matrix                                        OBSERVED
Maximum number of iterations                                   100
Convergence criterion                                    0.100D-05
Maximum number of EM iterations                                500
Convergence criteria for the EM algorithm
  Loglikelihood change                                   0.100D-02
  Relative loglikelihood change                          0.100D-05
  Derivative                                             0.100D-03
Minimum variance                                         0.100D-03
Maximum number of steepest descent iterations                   20
Maximum number of iterations for H1                           2000
Convergence criterion for H1                             0.100D-02
Optimization algorithm                                         EMA


SUMMARY OF DATA FOR THE FIRST REPLICATION

     Cluster information

     Number of level 3 clusters            50

       Size (s)    Number of level 2 clusters of Size s

          5            30

     Average cluster size for LEVEL2 level        5.000

     Estimated Intraclass Correlations for the Y Variables for LEVEL2 level

                Intraclass
     Variable  Correlation

     Y            0.180

     Average cluster size for LEVEL3 level      150.000

     Estimated Intraclass Correlations for the Y Variables for LEVEL3 level

                Intraclass
     Variable  Correlation

     Y            0.187


SAMPLE STATISTICS FOR THE FIRST REPLICATION

NOTE:  The sample statistics for within and between refer to the
       maximum-likelihood estimated within and between covariance
       matrices, respectively.


     ESTIMATED SAMPLE STATISTICS FOR WITHIN


           Means
              Y             X             W             Z
              ________      ________      ________      ________
                0.000        -0.010         0.000         0.000


           Covariances
              Y             X             W             Z
              ________      ________      ________      ________
 Y              2.638
 X              0.633         0.997
 W              0.000         0.000         0.000
 Z              0.000         0.000         0.000         0.000


           Correlations
              Y             X             W             Z
              ________      ________      ________      ________
 Y              1.000
 X              0.390         1.000
 W              0.000         0.000         0.000
 Z              0.000         0.000         0.000         0.000


     ESTIMATED SAMPLE STATISTICS FOR BETWEEN LEVEL2


           Means
              Y             X             W             Z
              ________      ________      ________      ________
                0.000         0.000         0.468         0.000


           Covariances
              Y             X             W             Z
              ________      ________      ________      ________
 Y              0.748
 X              0.000         0.000
 W              0.144         0.000         0.249
 Z              0.000         0.000         0.000         0.000


           Correlations
              Y             X             W             Z
              ________      ________      ________      ________
 Y              1.000
 X              0.000         0.000
 W              0.334         0.000         1.000
 Z              0.000         0.000         0.000         0.000


     ESTIMATED SAMPLE STATISTICS FOR BETWEEN LEVEL3


           Means
              Y             X             W             Z
              ________      ________      ________      ________
                0.900         0.000         0.000         0.079


           Covariances
              Y             X             W             Z
              ________      ________      ________      ________
 Y              0.780
 X              0.000         0.000
 W              0.000         0.000         0.000
 Z              0.626         0.000         0.000         0.992


           Correlations
              Y             X             W             Z
              ________      ________      ________      ________
 Y              1.000
 X              0.000         0.000
 W              0.000         0.000         0.000
 Z              0.711         0.000         0.000         1.000




MODEL FIT INFORMATION

Number of Free Parameters                       22

Loglikelihood

    H0 Value

        Mean                            -12512.213
        Std Dev                              0.000
        Number of successful computations        1

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

Information Criteria

    Akaike (AIC)

        Mean                             25068.425
        Std Dev                              0.000
        Number of successful computations        1

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

    Bayesian (BIC)

        Mean                             25220.724
        Std Dev                              0.000
        Number of successful computations        1

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

    Sample-Size Adjusted BIC (n* = (n + 2) / 24)

        Mean                             25150.812
        Std Dev                              0.000
        Number of successful computations        1

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



MODEL RESULTS

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

Within Level

 Residual Variances
  Y                   1.000     1.0397     0.0000     0.0173     0.0016 0.000 1.000

Between LEVEL2 Level

 Y        WITH
  S1                  0.300     0.3073     0.0000     0.0196     0.0001 1.000 1.000

 Residual Variances
  Y                   0.600     0.5929     0.0000     0.0310     0.0001 1.000 1.000
  S1                  0.400     0.3732     0.0000     0.0242     0.0007 1.000 1.000

Between LEVEL3 Level

 S1         ON
  Z                   0.200     0.1185     0.0000     0.0877     0.0066 1.000 0.000

 S2         ON
  Z                   0.300     0.2939     0.0000     0.0905     0.0000 1.000 1.000

 S12        ON
  Z                   0.200     0.2194     0.0000     0.1070     0.0004 1.000 1.000

 Y          ON
  Z                   0.600     0.5166     0.0000     0.0955     0.0070 1.000 1.000

 Y        WITH
  S1                  0.200     0.1497     0.0000     0.0670     0.0025 1.000 1.000
  S2                  0.100    -0.0633     0.0000     0.0623     0.0267 0.000 0.000
  S12                 0.000     0.0218     0.0000     0.0848     0.0005 1.000 0.000

 S1       WITH
  S2                  0.200     0.2571     0.0000     0.0538     0.0033 1.000 1.000
  S12                 0.000    -0.0961     0.0000     0.0936     0.0092 1.000 0.000

 S2       WITH
  S12                 0.000    -0.1924     0.0000     0.0806     0.0370 0.000 1.000

 Intercepts
  Y                   0.500     0.5961     0.0000     0.0928     0.0092 1.000 1.000
  S1                  0.400     0.4033     0.0000     0.1013     0.0000 1.000 1.000
  S2                  0.700     0.5531     0.0000     0.0943     0.0216 1.000 1.000
  S12                 0.400     0.4636     0.0000     0.1257     0.0040 1.000 1.000

 Residual Variances
  Y                   0.400     0.3725     0.0000     0.0634     0.0008 1.000 1.000
  S1                  0.400     0.4736     0.0000     0.0756     0.0054 1.000 1.000
  S2                  0.400     0.3121     0.0000     0.0820     0.0077 1.000 1.000
  S12                 0.500     0.6412     0.0000     0.1454     0.0199 1.000 1.000


QUALITY OF NUMERICAL RESULTS

     Average Condition Number for the Information Matrix      0.161E-02
       (ratio of smallest to largest eigenvalue)


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             0
 X                  0             0


           PSI
              Y             X
              ________      ________
 Y                  1
 X                  0             0


     PARAMETER SPECIFICATION FOR BETWEEN LEVEL2


           NU
              Y             W
              ________      ________
                    0             0


           LAMBDA
              S1%B2         Y             W
              ________      ________      ________
 Y                  0             0             0
 W                  0             0             0


           THETA
              Y             W
              ________      ________
 Y                  0
 W                  0             0


           ALPHA
              S1%B2         Y             W
              ________      ________      ________
                    0             0             0


           BETA
              S1%B2         Y             W
              ________      ________      ________
 S1%B2              0             0             0
 Y                  0             0             0
 W                  0             0             0


           PSI
              S1%B2         Y             W
              ________      ________      ________
 S1%B2              2
 Y                  3             4
 W                  0             0             0


     PARAMETER SPECIFICATION FOR BETWEEN LEVEL3


           NU
              Y             Z
              ________      ________
                    0             0


           LAMBDA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 Y                  0             0             0             0             0
 Z                  0             0             0             0             0


           THETA
              Y             Z
              ________      ________
 Y                  0
 Z                  0             0


           ALPHA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
                    5             6             7             8             0


           BETA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 S1%B3              0             0             0             0             9
 S2                 0             0             0             0            10
 S12                0             0             0             0            11
 Y                  0             0             0             0            12
 Z                  0             0             0             0             0


           PSI
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 S1%B3             13
 S2                14            15
 S12               16            17            18
 Y                 19            20            21            22
 Z                  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              1.000
 X              0.000         0.500


     STARTING VALUES FOR BETWEEN LEVEL2


           NU
              Y             W
              ________      ________
                0.000         0.000


           LAMBDA
              S1%B2         Y             W
              ________      ________      ________
 Y              0.000         1.000         0.000
 W              0.000         0.000         1.000


           THETA
              Y             W
              ________      ________
 Y              0.000
 W              0.000         0.000


           ALPHA
              S1%B2         Y             W
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              S1%B2         Y             W
              ________      ________      ________
 S1%B2          0.000         0.000         0.000
 Y              0.000         0.000         0.000
 W              0.000         0.000         0.000


           PSI
              S1%B2         Y             W
              ________      ________      ________
 S1%B2          0.400
 Y              0.300         0.600
 W              0.000         0.000         0.500


     STARTING VALUES FOR BETWEEN LEVEL3


           NU
              Y             Z
              ________      ________
                0.000         0.000


           LAMBDA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 Y              0.000         0.000         0.000         1.000         0.000
 Z              0.000         0.000         0.000         0.000         1.000


           THETA
              Y             Z
              ________      ________
 Y              0.000
 Z              0.000         0.000


           ALPHA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
                0.400         0.700         0.400         0.500         0.000


           BETA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 S1%B3          0.000         0.000         0.000         0.000         0.200
 S2             0.000         0.000         0.000         0.000         0.300
 S12            0.000         0.000         0.000         0.000         0.200
 Y              0.000         0.000         0.000         0.000         0.600
 Z              0.000         0.000         0.000         0.000         0.000


           PSI
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 S1%B3          0.400
 S2             0.200         0.400
 S12            0.000         0.000         0.500
 Y              0.200         0.100         0.000         0.400
 Z              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.000
 X              0.000         0.000


           PSI
              Y             X
              ________      ________
 Y              1.000
 X              0.000         1.000


     POPULATION VALUES FOR BETWEEN LEVEL2


           NU
              Y             W
              ________      ________
                0.000         0.000


           LAMBDA
              S1%B2         Y             W
              ________      ________      ________
 Y              0.000         1.000         0.000
 W              0.000         0.000         1.000


           THETA
              Y             W
              ________      ________
 Y              0.000
 W              0.000         0.000


           ALPHA
              S1%B2         Y             W
              ________      ________      ________
                0.000         0.000         0.000


           BETA
              S1%B2         Y             W
              ________      ________      ________
 S1%B2          0.000         0.000         0.000
 Y              0.000         0.000         0.000
 W              0.000         0.000         0.000


           PSI
              S1%B2         Y             W
              ________      ________      ________
 S1%B2          0.400
 Y              0.300         0.600
 W              0.000         0.000         1.000


     POPULATION VALUES FOR BETWEEN LEVEL3


           NU
              Y             Z
              ________      ________
                0.000         0.000


           LAMBDA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 Y              0.000         0.000         0.000         1.000         0.000
 Z              0.000         0.000         0.000         0.000         1.000


           THETA
              Y             Z
              ________      ________
 Y              0.000
 Z              0.000         0.000


           ALPHA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
                0.400         0.700         0.400         0.500         0.000


           BETA
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 S1%B3          0.000         0.000         0.000         0.000         0.200
 S2             0.000         0.000         0.000         0.000         0.300
 S12            0.000         0.000         0.000         0.000         0.200
 Y              0.000         0.000         0.000         0.000         0.600
 Z              0.000         0.000         0.000         0.000         0.000


           PSI
              S1%B3         S2            S12           Y             Z
              ________      ________      ________      ________      ________
 S1%B3          0.400
 S2             0.200         0.400
 S12            0.000         0.000         0.500
 Y              0.200         0.100         0.000         0.400
 Z              0.000         0.000         0.000         0.000         1.000


TECHNICAL 9 OUTPUT

  Error messages for each replication (if any)



SAVEDATA INFORMATION

  Order of variables

    Y
    X
    W
    Z
    LEVEL2
    LEVEL3

  Save file
    ex9.20.dat

  Save file format           Free
  Save file record length    10000


     Beginning Time:  22:26:55
        Ending Time:  22:26:57
       Elapsed Time:  00:00:02



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-2022 Muthen & Muthen

Back to examples