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

INPUT INSTRUCTIONS

TITLE:
this is an example of mixture modeling
with known classes (multiple group
analysis)

montecarlo:
names are y1-y4 g;
generate = g(1);
categorical = g;
genclasses = cg(2) c(2);
classes = cg(2) c(2);
nobs = 1000;
seed = 3454367;
nrep = 1;
save = ex7.21.dat;

ANALYSIS:
TYPE = MIXTURE;

MODEL POPULATION:
%OVERALL%
c#1 on cg#1*1;

MODEL POPULATION-c:
%c#1%
[y1-y4*-1];
%c#2%
[y1-y4*1];

MODEL POPULATION-cg:
%cg#1%
[g\$1@15];
y1-y4*1;
%cg#2%
[g\$1@-15];
y1-y4*.5;

MODEL:
%OVERALL%
c#1 on cg#1*1;

MODEL c:
%c#1%
[y1-y4*-1];
%c#2%
[y1-y4*1];

MODEL cg:
%cg#1%
[g\$1@15];
y1-y4*1;
%cg#2%
[g\$1@-15];
y1-y4*.5;

OUTPUT:
TECH8;

*** WARNING in MODEL command
All variables are uncorrelated with all other variables within class.
Check that this is what is intended.
1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS

this is an example of mixture modeling
with known classes (multiple group
analysis)

SUMMARY OF ANALYSIS

Number of groups                                                 1
Number of observations                                        1000

Number of replications
Requested                                                    1
Completed                                                    1
Value of seed                                              3454367

Number of dependent variables                                    5
Number of independent variables                                  0
Number of continuous latent variables                            0
Number of categorical latent variables                           2

Observed dependent variables

Continuous
Y1          Y2          Y3          Y4

Binary and ordered categorical (ordinal)
G

Categorical latent variables
CG          C

Estimator                                                      MLR
Information matrix                                        OBSERVED
Optimization Specifications for the Quasi-Newton Algorithm for
Continuous Outcomes
Maximum number of iterations                                 100
Convergence criterion                                  0.100D-05
Optimization Specifications for the EM Algorithm
Maximum number of iterations                                 500
Convergence criteria
Loglikelihood change                                 0.100D-06
Relative loglikelihood change                        0.100D-06
Derivative                                           0.100D-05
Optimization Specifications for the M step of the EM Algorithm for
Categorical Latent variables
Number of M step iterations                                    1
M step convergence criterion                           0.100D-05
Basis for M step termination                           ITERATION
Optimization Specifications for the M step of the EM Algorithm for
Censored, Binary or Ordered Categorical (Ordinal), Unordered
Categorical (Nominal) and Count Outcomes
Number of M step iterations                                    1
M step convergence criterion                           0.100D-05
Basis for M step termination                           ITERATION
Maximum value for logit thresholds                            15
Minimum value for logit thresholds                           -15
Minimum expected cell size for chi-square              0.100D-01
Optimization algorithm                                         EMA
Parameterization                                             LOGIT

SAMPLE STATISTICS FOR THE FIRST REPLICATION

SAMPLE STATISTICS

Means
Y1            Y2            Y3            Y4
________      ________      ________      ________
-0.239        -0.261        -0.262        -0.256

Covariances
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             1.628
Y2             0.821         1.542
Y3             0.869         0.868         1.689
Y4             0.851         0.901         0.933         1.704

Correlations
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             1.000
Y2             0.518         1.000
Y3             0.524         0.538         1.000
Y4             0.511         0.556         0.550         1.000

MODEL FIT INFORMATION

Number of Free Parameters                       19

Loglikelihood

H0 Value

Mean                             -6273.830
Std Dev                              0.000
Number of successful computations        1

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

Information Criteria

Akaike (AIC)

Mean                             12585.660
Std Dev                              0.000
Number of successful computations        1

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

Bayesian (BIC)

Mean                             12678.907
Std Dev                              0.000
Number of successful computations        1

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

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

Mean                             12618.562
Std Dev                              0.000
Number of successful computations        1

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

Chi-Square Test of Model Fit for the Binary and Ordered Categorical
(Ordinal) Outcomes

Pearson Chi-Square

Mean                                 0.000
Std Dev                              0.000
Degrees of freedom                       0
Number of successful computations        1

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

Likelihood Ratio Chi-Square

Mean                                 0.000
Std Dev                              0.000
Degrees of freedom                       0
Number of successful computations        1

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

MODEL RESULTS USE THE LATENT CLASS VARIABLE ORDER

CG  C

FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON THE ESTIMATED MODEL

Latent Class
Pattern

1  1        386.99769          0.38700
1  2        126.00232          0.12600
2  1        235.02303          0.23502
2  2        251.97696          0.25198

FINAL CLASS COUNTS AND PROPORTIONS FOR EACH LATENT CLASS VARIABLE
BASED ON THE ESTIMATED MODEL

Latent Class
Variable    Class

CG             1       513.00000          0.51300
2       487.00000          0.48700
C              1       622.02069          0.62202
2       377.97928          0.37798

LATENT TRANSITION PROBABILITIES BASED ON THE ESTIMATED MODEL

CG Classes (Rows) by C Classes (Columns)

1        2

1     0.754    0.246
2     0.483    0.517

FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON ESTIMATED POSTERIOR PROBABILITIES

Latent Class
Pattern

1  1        386.99763          0.38700
1  2        126.00238          0.12600
2  1        235.02304          0.23502
2  2        251.97695          0.25198

FINAL CLASS COUNTS AND PROPORTIONS FOR EACH LATENT CLASS VARIABLE
BASED ON ESTIMATED POSTERIOR PROBABILITIES

Latent Class
Variable    Class

CG             1       513.00000          0.51300
2       487.00000          0.48700
C              1       622.02063          0.62202
2       377.97931          0.37798

FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASS PATTERNS
BASED ON THEIR MOST LIKELY LATENT CLASS PATTERN

Class Counts and Proportions

Latent Class
Pattern

1  1              387          0.38700
1  2              126          0.12600
2  1              235          0.23500
2  2              252          0.25200

FINAL CLASS COUNTS AND PROPORTIONS FOR EACH LATENT CLASS VARIABLE
BASED ON THEIR MOST LIKELY LATENT CLASS PATTERN

Latent Class
Variable    Class

CG             1             513          0.51300
2             487          0.48700
C              1             622          0.62200
2             378          0.37800

CLASSIFICATION QUALITY

Entropy                         0.980

MODEL RESULTS

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

Parameters for Class-specific Model Parts of CG

Latent Class CG#1

Thresholds
G\$1                15.000    15.0000     0.0000     0.0000     0.0000 1.000 0.000

Variances
Y1                  1.000     1.0205     0.0000     0.0660     0.0004 1.000 1.000
Y2                  1.000     0.9857     0.0000     0.0647     0.0002 1.000 1.000
Y3                  1.000     0.9902     0.0000     0.0626     0.0001 1.000 1.000
Y4                  1.000     1.0008     0.0000     0.0603     0.0000 1.000 1.000

Latent Class CG#2

Thresholds
G\$1               -15.000   -15.0000     0.0000     0.0000     0.0000 1.000 0.000

Variances
Y1                  0.500     0.5513     0.0000     0.0352     0.0026 1.000 1.000
Y2                  0.500     0.4468     0.0000     0.0270     0.0028 0.000 1.000
Y3                  0.500     0.5139     0.0000     0.0315     0.0002 1.000 1.000
Y4                  0.500     0.4646     0.0000     0.0301     0.0013 1.000 1.000

Parameters for Class-specific Model Parts of C

Latent Class C#1

Means
Y1                 -1.000    -0.9596     0.0000     0.0359     0.0016 1.000 1.000
Y2                 -1.000    -0.9574     0.0000     0.0333     0.0018 1.000 1.000
Y3                 -1.000    -1.0097     0.0000     0.0343     0.0001 1.000 1.000
Y4                 -1.000    -1.0405     0.0000     0.0336     0.0016 1.000 1.000

Latent Class C#2

Means
Y1                  1.000     0.9381     0.0000     0.0415     0.0038 1.000 1.000
Y2                  1.000     0.9049     0.0000     0.0386     0.0090 0.000 1.000
Y3                  1.000     0.9704     0.0000     0.0414     0.0009 1.000 1.000
Y4                  1.000     1.0084     0.0000     0.0399     0.0001 1.000 1.000

Categorical Latent Variables

C#1      ON
CG#1                1.000     1.1918     0.0000     0.1402     0.0368 1.000 1.000

Means
CG#1                0.000     0.0520     0.0000     0.0633     0.0027 1.000 0.000
C#1                 0.000    -0.0697     0.0000     0.0910     0.0049 1.000 0.000

QUALITY OF NUMERICAL RESULTS

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

C-SPECIFIC CLASSIFICATION RESULTS

Classification Quality for CG

Entropy                         1.000

Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)

1        2

1   1.000    0.000
2   0.000    1.000

Classification Quality for C

Entropy                         0.961

Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)

1        2

1   0.993    0.007
2   0.011    0.989

TECHNICAL 1 OUTPUT

PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 1 1

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
1             2             3             4

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1                 5
Y2                 0             6
Y3                 0             0             7
Y4                 0             0             0             8

PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 1 2

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
9            10            11            12

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1                 5
Y2                 0             6
Y3                 0             0             7
Y4                 0             0             0             8

PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 2 1

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
1             2             3             4

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1                13
Y2                 0            14
Y3                 0             0            15
Y4                 0             0             0            16

PARAMETER SPECIFICATION FOR LATENT CLASS PATTERN 2 2

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
9            10            11            12

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1                13
Y2                 0            14
Y3                 0             0            15
Y4                 0             0             0            16

PARAMETER SPECIFICATION FOR LATENT CLASS INDICATOR MODEL PART

TAU(U) FOR LATENT CLASS PATTERN 1 1
G\$1
________
0

TAU(U) FOR LATENT CLASS PATTERN 1 2
G\$1
________
0

TAU(U) FOR LATENT CLASS PATTERN 2 1
G\$1
________
0

TAU(U) FOR LATENT CLASS PATTERN 2 2
G\$1
________
0

PARAMETER SPECIFICATION FOR LATENT CLASS REGRESSION MODEL PART

ALPHA(C)
CG#1          CG#2          C#1           C#2
________      ________      ________      ________
17             0            18             0

BETA(C)
CG#1          CG#2
________      ________
C#1               19             0
C#2                0             0

STARTING VALUES FOR LATENT CLASS PATTERN 1 1

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
-1.000        -1.000        -1.000        -1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             1.000
Y2             0.000         1.000
Y3             0.000         0.000         1.000
Y4             0.000         0.000         0.000         1.000

STARTING VALUES FOR LATENT CLASS PATTERN 1 2

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
1.000         1.000         1.000         1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             1.000
Y2             0.000         1.000
Y3             0.000         0.000         1.000
Y4             0.000         0.000         0.000         1.000

STARTING VALUES FOR LATENT CLASS PATTERN 2 1

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
-1.000        -1.000        -1.000        -1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             0.500
Y2             0.000         0.500
Y3             0.000         0.000         0.500
Y4             0.000         0.000         0.000         0.500

STARTING VALUES FOR LATENT CLASS PATTERN 2 2

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
1.000         1.000         1.000         1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             0.500
Y2             0.000         0.500
Y3             0.000         0.000         0.500
Y4             0.000         0.000         0.000         0.500

STARTING VALUES FOR LATENT CLASS INDICATOR MODEL PART

TAU(U) FOR LATENT CLASS PATTERN 1 1
G\$1
________
15.000

TAU(U) FOR LATENT CLASS PATTERN 1 2
G\$1
________
15.000

TAU(U) FOR LATENT CLASS PATTERN 2 1
G\$1
________
-15.000

TAU(U) FOR LATENT CLASS PATTERN 2 2
G\$1
________
-15.000

STARTING VALUES FOR LATENT CLASS REGRESSION MODEL PART

ALPHA(C)
CG#1          CG#2          C#1           C#2
________      ________      ________      ________
0.000         0.000         0.000         0.000

BETA(C)
CG#1          CG#2
________      ________
C#1            1.000         0.000
C#2            0.000         0.000

POPULATION VALUES FOR LATENT CLASS PATTERN 1 1

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
-1.000        -1.000        -1.000        -1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             1.000
Y2             0.000         1.000
Y3             0.000         0.000         1.000
Y4             0.000         0.000         0.000         1.000

POPULATION VALUES FOR LATENT CLASS PATTERN 1 2

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
1.000         1.000         1.000         1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             1.000
Y2             0.000         1.000
Y3             0.000         0.000         1.000
Y4             0.000         0.000         0.000         1.000

POPULATION VALUES FOR LATENT CLASS PATTERN 2 1

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
-1.000        -1.000        -1.000        -1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             0.500
Y2             0.000         0.500
Y3             0.000         0.000         0.500
Y4             0.000         0.000         0.000         0.500

POPULATION VALUES FOR LATENT CLASS PATTERN 2 2

NU
Y1            Y2            Y3            Y4
________      ________      ________      ________
1.000         1.000         1.000         1.000

THETA
Y1            Y2            Y3            Y4
________      ________      ________      ________
Y1             0.500
Y2             0.000         0.500
Y3             0.000         0.000         0.500
Y4             0.000         0.000         0.000         0.500

POPULATION VALUES FOR LATENT CLASS INDICATOR MODEL PART

TAU(U) FOR LATENT CLASS PATTERN 1 1
G\$1
________
15.000

TAU(U) FOR LATENT CLASS PATTERN 1 2
G\$1
________
15.000

TAU(U) FOR LATENT CLASS PATTERN 2 1
G\$1
________
-15.000

TAU(U) FOR LATENT CLASS PATTERN 2 2
G\$1
________
-15.000

POPULATION VALUES FOR LATENT CLASS REGRESSION MODEL PART

ALPHA(C)
CG#1          CG#2          C#1           C#2
________      ________      ________      ________
0.000         0.000         0.000         0.000

BETA(C)
CG#1          CG#2
________      ________
C#1            1.000         0.000
C#2            0.000         0.000

TECHNICAL 8 OUTPUT

TECHNICAL 8 OUTPUT FOR REPLICATION 1

E STEP  ITER  LOGLIKELIHOOD    ABS CHANGE   REL CHANGE  ALGORITHM
1 -0.62849684D+04    0.0000000    0.0000000  EM
2 -0.62738425D+04   11.1259400    0.0017702  EM
3 -0.62738300D+04    0.0124337    0.0000020  EM
4 -0.62738299D+04    0.0001678    0.0000000  EM
5 -0.62738299D+04    0.0000028    0.0000000  EM
6 -0.62738299D+04    0.0000001    0.0000000  EM

SAVEDATA INFORMATION

Order of variables

G
Y1
Y2
Y3
Y4
CG
C

Save file
ex7.21.dat

Save file format           Free
Save file record length    10000

Beginning Time:  22:24:33
Ending Time:  22:24:33
Elapsed Time:  00:00:00

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
```