Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022 10:25 PM
INPUT INSTRUCTIONS
title:
this is an example of a GMM with a
categorical distal outcome using automatic
starting values and random starts
montecarlo:
names are y1-y4 u x;
generate = u(1);
categorical = u;
genclasses = c(2);
classes = c(2);
nobs = 500;
seed = 3454367;
nrep = 1;
save = ex8.6.dat;
analysis:
type = mixture;
model population:
%overall%
[x@0]; x@1;
y1-y4*.5;
i s | y1@0 y2@1 y3@2 y4@3;
i*1; s*.5;
c#1 on x*1;
i on x*1;
s on x*.3;
%c#1%
[i*2 s*1];
[u$1*-1];
%c#2%
[i*0 s*0];
[u$1*1];
model:
%overall%
y1-y4*.5;
i s | y1@0 y2@1 y3@2 y4@3;
i*1; s*.5;
c#1 on x*1;
i on x*1;
s on x*.3;
%c#1%
[i*2 s*1];
[u$1*-1];
%c#2%
[i*0 s*0];
[u$1*1];
output:
tech8 tech9;
INPUT READING TERMINATED NORMALLY
this is an example of a GMM with a
categorical distal outcome using automatic
starting values and random starts
SUMMARY OF ANALYSIS
Number of groups 1
Number of observations 500
Number of replications
Requested 1
Completed 1
Value of seed 3454367
Number of dependent variables 5
Number of independent variables 1
Number of continuous latent variables 2
Number of categorical latent variables 1
Observed dependent variables
Continuous
Y1 Y2 Y3 Y4
Binary and ordered categorical (ordinal)
U
Observed independent variables
X
Continuous latent variables
I S
Categorical latent variables
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
Link LOGIT
SAMPLE STATISTICS FOR THE FIRST REPLICATION
SAMPLE STATISTICS
Means
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
0.878 1.424 1.810 2.301 -0.060
Covariances
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 4.378
Y2 5.010 7.832
Y3 6.272 9.587 13.350
Y4 7.259 11.475 15.742 19.964
X 1.374 1.961 2.535 3.012 0.982
Correlations
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 1.000
Y2 0.856 1.000
Y3 0.820 0.938 1.000
Y4 0.776 0.918 0.964 1.000
X 0.663 0.707 0.700 0.680 1.000
MODEL FIT INFORMATION
Number of Free Parameters 17
Loglikelihood
H0 Value
Mean -3693.340
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 -3693.340 -3693.340
0.980 0.000 -3693.340 -3693.340
0.950 0.000 -3693.340 -3693.340
0.900 0.000 -3693.340 -3693.340
0.800 0.000 -3693.340 -3693.340
0.700 0.000 -3693.340 -3693.340
0.500 0.000 -3693.340 -3693.340
0.300 0.000 -3693.340 -3693.340
0.200 0.000 -3693.340 -3693.340
0.100 0.000 -3693.340 -3693.340
0.050 0.000 -3693.340 -3693.340
0.020 0.000 -3693.340 -3693.340
0.010 0.000 -3693.340 -3693.340
Information Criteria
Akaike (AIC)
Mean 7420.680
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 7420.680 7420.680
0.980 0.000 7420.680 7420.680
0.950 0.000 7420.680 7420.680
0.900 0.000 7420.680 7420.680
0.800 0.000 7420.680 7420.680
0.700 0.000 7420.680 7420.680
0.500 0.000 7420.680 7420.680
0.300 0.000 7420.680 7420.680
0.200 0.000 7420.680 7420.680
0.100 0.000 7420.680 7420.680
0.050 0.000 7420.680 7420.680
0.020 0.000 7420.680 7420.680
0.010 0.000 7420.680 7420.680
Bayesian (BIC)
Mean 7492.328
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 7492.328 7492.328
0.980 0.000 7492.328 7492.328
0.950 0.000 7492.328 7492.328
0.900 0.000 7492.328 7492.328
0.800 0.000 7492.328 7492.328
0.700 0.000 7492.328 7492.328
0.500 0.000 7492.328 7492.328
0.300 0.000 7492.328 7492.328
0.200 0.000 7492.328 7492.328
0.100 0.000 7492.328 7492.328
0.050 0.000 7492.328 7492.328
0.020 0.000 7492.328 7492.328
0.010 0.000 7492.328 7492.328
Sample-Size Adjusted BIC (n* = (n + 2) / 24)
Mean 7438.369
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 7438.369 7438.369
0.980 0.000 7438.369 7438.369
0.950 0.000 7438.369 7438.369
0.900 0.000 7438.369 7438.369
0.800 0.000 7438.369 7438.369
0.700 0.000 7438.369 7438.369
0.500 0.000 7438.369 7438.369
0.300 0.000 7438.369 7438.369
0.200 0.000 7438.369 7438.369
0.100 0.000 7438.369 7438.369
0.050 0.000 7438.369 7438.369
0.020 0.000 7438.369 7438.369
0.010 0.000 7438.369 7438.369
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
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON THE ESTIMATED MODEL
Latent
Classes
1 245.28700 0.49057
2 254.71300 0.50943
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON ESTIMATED POSTERIOR PROBABILITIES
Latent
Classes
1 245.28689 0.49057
2 254.71311 0.50943
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON THEIR MOST LIKELY LATENT CLASS MEMBERSHIP
Class Counts and Proportions
Latent
Classes
1 249 0.49800
2 251 0.50200
CLASSIFICATION QUALITY
Entropy 0.691
Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)
1 2
1 0.904 0.096
2 0.081 0.919
Classification Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 0.917 0.083
2 0.094 0.906
Logits for the Classification Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 2.407 0.000
2 -2.264 0.000
MODEL RESULTS
ESTIMATES S. E. M. S. E. 95% % Sig
Population Average Std. Dev. Average Cover Coeff
Latent Class 1
I |
Y1 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y2 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y3 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y4 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
S |
Y1 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y2 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y3 2.000 2.0000 0.0000 0.0000 0.0000 1.000 0.000
Y4 3.000 3.0000 0.0000 0.0000 0.0000 1.000 0.000
I ON
X 1.000 1.0141 0.0000 0.0954 0.0002 1.000 1.000
S ON
X 0.300 0.3130 0.0000 0.0450 0.0002 1.000 1.000
S WITH
I 0.000 0.0068 0.0000 0.0513 0.0000 1.000 0.000
Intercepts
Y1 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y2 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y3 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y4 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
I 2.000 1.9047 0.0000 0.1134 0.0091 1.000 1.000
S 1.000 1.0463 0.0000 0.0670 0.0021 1.000 1.000
Thresholds
U$1 -1.000 -0.9817 0.0000 0.1946 0.0003 1.000 1.000
Residual Variances
Y1 0.500 0.6080 0.0000 0.0722 0.0117 1.000 1.000
Y2 0.500 0.5539 0.0000 0.0438 0.0029 1.000 1.000
Y3 0.500 0.4330 0.0000 0.0510 0.0045 1.000 1.000
Y4 0.500 0.5934 0.0000 0.1025 0.0087 1.000 1.000
I 1.000 1.2020 0.0000 0.1477 0.0408 1.000 1.000
S 0.500 0.4154 0.0000 0.0487 0.0072 1.000 1.000
Latent Class 2
I |
Y1 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y2 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y3 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y4 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
S |
Y1 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y2 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
Y3 2.000 2.0000 0.0000 0.0000 0.0000 1.000 0.000
Y4 3.000 3.0000 0.0000 0.0000 0.0000 1.000 0.000
I ON
X 1.000 1.0141 0.0000 0.0954 0.0002 1.000 1.000
S ON
X 0.300 0.3130 0.0000 0.0450 0.0002 1.000 1.000
S WITH
I 0.000 0.0068 0.0000 0.0513 0.0000 1.000 0.000
Intercepts
Y1 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y2 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y3 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Y4 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
I 0.000 0.0626 0.0000 0.1469 0.0039 1.000 0.000
S 0.000 -0.0601 0.0000 0.0629 0.0036 1.000 0.000
Thresholds
U$1 1.000 1.0188 0.0000 0.1660 0.0004 1.000 1.000
Residual Variances
Y1 0.500 0.6080 0.0000 0.0722 0.0117 1.000 1.000
Y2 0.500 0.5539 0.0000 0.0438 0.0029 1.000 1.000
Y3 0.500 0.4330 0.0000 0.0510 0.0045 1.000 1.000
Y4 0.500 0.5934 0.0000 0.1025 0.0087 1.000 1.000
I 1.000 1.2020 0.0000 0.1477 0.0408 1.000 1.000
S 0.500 0.4154 0.0000 0.0487 0.0072 1.000 1.000
Categorical Latent Variables
C#1 ON
X 1.000 1.0954 0.0000 0.1912 0.0091 1.000 1.000
Intercepts
C#1 0.000 0.0186 0.0000 0.1674 0.0003 1.000 0.000
QUALITY OF NUMERICAL RESULTS
Average Condition Number for the Information Matrix 0.784E-03
(ratio of smallest to largest eigenvalue)
TECHNICAL 1 OUTPUT
PARAMETER SPECIFICATION FOR LATENT CLASS 1
NU
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
0 0 0 0 0
LAMBDA
I S X
________ ________ ________
Y1 0 0 0
Y2 0 0 0
Y3 0 0 0
Y4 0 0 0
X 0 0 0
THETA
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 1
Y2 0 2
Y3 0 0 3
Y4 0 0 0 4
X 0 0 0 0 0
ALPHA
I S X
________ ________ ________
5 6 0
BETA
I S X
________ ________ ________
I 0 0 7
S 0 0 8
X 0 0 0
PSI
I S X
________ ________ ________
I 9
S 10 11
X 0 0 0
PARAMETER SPECIFICATION FOR LATENT CLASS 2
NU
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
0 0 0 0 0
LAMBDA
I S X
________ ________ ________
Y1 0 0 0
Y2 0 0 0
Y3 0 0 0
Y4 0 0 0
X 0 0 0
THETA
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 1
Y2 0 2
Y3 0 0 3
Y4 0 0 0 4
X 0 0 0 0 0
ALPHA
I S X
________ ________ ________
12 13 0
BETA
I S X
________ ________ ________
I 0 0 7
S 0 0 8
X 0 0 0
PSI
I S X
________ ________ ________
I 9
S 10 11
X 0 0 0
PARAMETER SPECIFICATION FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U$1
________
14
TAU(U) FOR LATENT CLASS 2
U$1
________
15
PARAMETER SPECIFICATION FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
C#1 C#2
________ ________
16 0
GAMMA(C)
X
________
C#1 17
C#2 0
STARTING VALUES FOR LATENT CLASS 1
NU
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
0.000 0.000 0.000 0.000 0.000
LAMBDA
I S X
________ ________ ________
Y1 1.000 0.000 0.000
Y2 1.000 1.000 0.000
Y3 1.000 2.000 0.000
Y4 1.000 3.000 0.000
X 0.000 0.000 1.000
THETA
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 0.500
Y2 0.000 0.500
Y3 0.000 0.000 0.500
Y4 0.000 0.000 0.000 0.500
X 0.000 0.000 0.000 0.000 0.000
ALPHA
I S X
________ ________ ________
2.000 1.000 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 1.000
S 0.000 0.000 0.300
X 0.000 0.000 0.000
PSI
I S X
________ ________ ________
I 1.000
S 0.000 0.500
X 0.000 0.000 0.500
STARTING VALUES FOR LATENT CLASS 2
NU
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
0.000 0.000 0.000 0.000 0.000
LAMBDA
I S X
________ ________ ________
Y1 1.000 0.000 0.000
Y2 1.000 1.000 0.000
Y3 1.000 2.000 0.000
Y4 1.000 3.000 0.000
X 0.000 0.000 1.000
THETA
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 0.500
Y2 0.000 0.500
Y3 0.000 0.000 0.500
Y4 0.000 0.000 0.000 0.500
X 0.000 0.000 0.000 0.000 0.000
ALPHA
I S X
________ ________ ________
0.000 0.000 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 1.000
S 0.000 0.000 0.300
X 0.000 0.000 0.000
PSI
I S X
________ ________ ________
I 1.000
S 0.000 0.500
X 0.000 0.000 0.500
STARTING VALUES FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U$1
________
-1.000
TAU(U) FOR LATENT CLASS 2
U$1
________
1.000
STARTING VALUES FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
C#1 C#2
________ ________
0.000 0.000
GAMMA(C)
X
________
C#1 1.000
C#2 0.000
POPULATION VALUES FOR LATENT CLASS 1
NU
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
0.000 0.000 0.000 0.000 0.000
LAMBDA
I S X
________ ________ ________
Y1 1.000 0.000 0.000
Y2 1.000 1.000 0.000
Y3 1.000 2.000 0.000
Y4 1.000 3.000 0.000
X 0.000 0.000 1.000
THETA
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 0.500
Y2 0.000 0.500
Y3 0.000 0.000 0.500
Y4 0.000 0.000 0.000 0.500
X 0.000 0.000 0.000 0.000 0.000
ALPHA
I S X
________ ________ ________
2.000 1.000 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 1.000
S 0.000 0.000 0.300
X 0.000 0.000 0.000
PSI
I S X
________ ________ ________
I 1.000
S 0.000 0.500
X 0.000 0.000 1.000
POPULATION VALUES FOR LATENT CLASS 2
NU
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
0.000 0.000 0.000 0.000 0.000
LAMBDA
I S X
________ ________ ________
Y1 1.000 0.000 0.000
Y2 1.000 1.000 0.000
Y3 1.000 2.000 0.000
Y4 1.000 3.000 0.000
X 0.000 0.000 1.000
THETA
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 0.500
Y2 0.000 0.500
Y3 0.000 0.000 0.500
Y4 0.000 0.000 0.000 0.500
X 0.000 0.000 0.000 0.000 0.000
ALPHA
I S X
________ ________ ________
0.000 0.000 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 1.000
S 0.000 0.000 0.300
X 0.000 0.000 0.000
PSI
I S X
________ ________ ________
I 1.000
S 0.000 0.500
X 0.000 0.000 1.000
POPULATION VALUES FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U$1
________
-1.000
TAU(U) FOR LATENT CLASS 2
U$1
________
1.000
POPULATION VALUES FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
C#1 C#2
________ ________
0.000 0.000
GAMMA(C)
X
________
C#1 1.000
C#2 0.000
TECHNICAL 8 OUTPUT
TECHNICAL 8 OUTPUT FOR REPLICATION 1
E STEP ITER LOGLIKELIHOOD ABS CHANGE REL CHANGE ALGORITHM
1 -0.37001969D+04 0.0000000 0.0000000 EM
2 -0.36943862D+04 5.8106241 0.0015704 EM
3 -0.36938129D+04 0.5733354 0.0001552 EM
4 -0.36935628D+04 0.2500933 0.0000677 EM
5 -0.36934497D+04 0.1131127 0.0000306 EM
6 -0.36933966D+04 0.0530806 0.0000144 EM
7 -0.36933706D+04 0.0260465 0.0000071 EM
8 -0.36933572D+04 0.0133987 0.0000036 EM
9 -0.36933500D+04 0.0072129 0.0000020 EM
10 -0.36933459D+04 0.0040457 0.0000011 EM
11 -0.36933436D+04 0.0023507 0.0000006 EM
12 -0.36933422D+04 0.0014067 0.0000004 EM
13 -0.36933413D+04 0.0008621 0.0000002 EM
14 -0.36933408D+04 0.0005385 0.0000001 EM
15 -0.36933404D+04 0.0003415 0.0000001 EM
16 -0.36933402D+04 0.0002191 0.0000001 EM
17 -0.36933401D+04 0.0001420 0.0000000 EM
18 -0.36933400D+04 0.0000925 0.0000000 EM
19 -0.36933399D+04 0.0000606 0.0000000 EM
20 -0.36933399D+04 0.0000399 0.0000000 EM
21 -0.36933398D+04 0.0000263 0.0000000 EM
22 -0.36933398D+04 0.0000174 0.0000000 EM
23 -0.36933398D+04 0.0000115 0.0000000 EM
24 -0.36933398D+04 0.0000077 0.0000000 EM
25 -0.36933398D+04 0.0000051 0.0000000 EM
26 -0.36933398D+04 0.0000034 0.0000000 EM
27 -0.36933398D+04 0.0000023 0.0000000 EM
28 -0.36933398D+04 0.0000015 0.0000000 EM
29 -0.36933398D+04 0.0000010 0.0000000 EM
30 -0.36933398D+04 0.0000007 0.0000000 EM
31 -0.36933398D+04 0.0000004 0.0000000 EM
32 -0.36933398D+04 0.0000003 0.0000000 EM
33 -0.36933398D+04 0.0000002 0.0000000 EM
34 -0.36933398D+04 0.0000001 0.0000000 EM
35 -0.36933398D+04 0.0000001 0.0000000 EM
36 -0.36933398D+04 0.0000001 0.0000000 EM
37 -0.36933398D+04 0.0000000 0.0000000 EM
38 -0.36933398D+04 0.0000000 0.0000000 EM
39 -0.36933398D+04 0.0000000 0.0000000 FS
40 -0.36933398D+04 0.0000000 0.0000000 EM
TECHNICAL 9 OUTPUT
Error messages for each replication (if any)
SAVEDATA INFORMATION
Order of variables
U
Y1
Y2
Y3
Y4
X
C
Save file
ex8.6.dat
Save file format Free
Save file record length 10000
Beginning Time: 22:25:04
Ending Time: 22:25:05
Elapsed Time: 00:00:01
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