Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022 10:24 PM
INPUT INSTRUCTIONS
title:
this is an example of a GMM for a
continuous outcome using user-specified
starting values and random starts
montecarlo:
names are y1-y4 x;
genclasses = c(2);
classes = c(2);
nobs = 500;
seed = 3454367;
nrep = 1;
save = ex8.2.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*.4;
s on x*.3;
%c#1%
[i*1 s*.5];
%c#2%
[i*3 s*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*.4;
s on x*.3;
%c#1%
[i*1 s*.5];
%c#2%
[i*3 s*1];
output:
tech8 tech9;
INPUT READING TERMINATED NORMALLY
this is an example of a GMM for a
continuous outcome using user-specified
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 4
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
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
SAMPLE STATISTICS FOR THE FIRST REPLICATION
SAMPLE STATISTICS
Means
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
1.913 2.708 3.342 4.080 -0.060
Covariances
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 2.436
Y2 2.060 3.465
Y3 2.225 3.678 5.420
Y4 2.351 4.331 6.165 8.401
X -0.013 0.270 0.539 0.711 0.982
Correlations
Y1 Y2 Y3 Y4 X
________ ________ ________ ________ ________
Y1 1.000
Y2 0.709 1.000
Y3 0.612 0.849 1.000
Y4 0.520 0.803 0.914 1.000
X -0.008 0.146 0.234 0.248 1.000
MODEL FIT INFORMATION
Number of Free Parameters 15
Loglikelihood
H0 Value
Mean -3337.654
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 -3337.654 -3337.654
0.980 0.000 -3337.654 -3337.654
0.950 0.000 -3337.654 -3337.654
0.900 0.000 -3337.654 -3337.654
0.800 0.000 -3337.654 -3337.654
0.700 0.000 -3337.654 -3337.654
0.500 0.000 -3337.654 -3337.654
0.300 0.000 -3337.654 -3337.654
0.200 0.000 -3337.654 -3337.654
0.100 0.000 -3337.654 -3337.654
0.050 0.000 -3337.654 -3337.654
0.020 0.000 -3337.654 -3337.654
0.010 0.000 -3337.654 -3337.654
Information Criteria
Akaike (AIC)
Mean 6705.307
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 6705.307 6705.307
0.980 0.000 6705.307 6705.307
0.950 0.000 6705.307 6705.307
0.900 0.000 6705.307 6705.307
0.800 0.000 6705.307 6705.307
0.700 0.000 6705.307 6705.307
0.500 0.000 6705.307 6705.307
0.300 0.000 6705.307 6705.307
0.200 0.000 6705.307 6705.307
0.100 0.000 6705.307 6705.307
0.050 0.000 6705.307 6705.307
0.020 0.000 6705.307 6705.307
0.010 0.000 6705.307 6705.307
Bayesian (BIC)
Mean 6768.526
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 6768.526 6768.526
0.980 0.000 6768.526 6768.526
0.950 0.000 6768.526 6768.526
0.900 0.000 6768.526 6768.526
0.800 0.000 6768.526 6768.526
0.700 0.000 6768.526 6768.526
0.500 0.000 6768.526 6768.526
0.300 0.000 6768.526 6768.526
0.200 0.000 6768.526 6768.526
0.100 0.000 6768.526 6768.526
0.050 0.000 6768.526 6768.526
0.020 0.000 6768.526 6768.526
0.010 0.000 6768.526 6768.526
Sample-Size Adjusted BIC (n* = (n + 2) / 24)
Mean 6720.915
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 6720.915 6720.915
0.980 0.000 6720.915 6720.915
0.950 0.000 6720.915 6720.915
0.900 0.000 6720.915 6720.915
0.800 0.000 6720.915 6720.915
0.700 0.000 6720.915 6720.915
0.500 0.000 6720.915 6720.915
0.300 0.000 6720.915 6720.915
0.200 0.000 6720.915 6720.915
0.100 0.000 6720.915 6720.915
0.050 0.000 6720.915 6720.915
0.020 0.000 6720.915 6720.915
0.010 0.000 6720.915 6720.915
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON THE ESTIMATED MODEL
Latent
Classes
1 242.09508 0.48419
2 257.90492 0.51581
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON ESTIMATED POSTERIOR PROBABILITIES
Latent
Classes
1 242.09480 0.48419
2 257.90520 0.51581
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON THEIR MOST LIKELY LATENT CLASS MEMBERSHIP
Class Counts and Proportions
Latent
Classes
1 236 0.47200
2 264 0.52800
CLASSIFICATION QUALITY
Entropy 0.557
Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)
1 2
1 0.872 0.128
2 0.138 0.862
Classification Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 0.850 0.150
2 0.117 0.883
Logits for the Classification Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 1.735 0.000
2 -2.020 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 0.400 0.3541 0.0000 0.1482 0.0021 1.000 1.000
S ON
X 0.300 0.3389 0.0000 0.0550 0.0015 1.000 1.000
S WITH
I 0.000 -0.0543 0.0000 0.0691 0.0029 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 1.000 0.9162 0.0000 0.1075 0.0070 1.000 1.000
S 0.500 0.4559 0.0000 0.1166 0.0019 1.000 1.000
Residual Variances
Y1 0.500 0.6041 0.0000 0.0730 0.0108 1.000 1.000
Y2 0.500 0.5566 0.0000 0.0459 0.0032 1.000 1.000
Y3 0.500 0.4461 0.0000 0.0525 0.0029 1.000 1.000
Y4 0.500 0.5599 0.0000 0.0994 0.0036 1.000 1.000
I 1.000 0.9783 0.0000 0.1993 0.0005 1.000 1.000
S 0.500 0.4280 0.0000 0.0493 0.0052 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 0.400 0.3541 0.0000 0.1482 0.0021 1.000 1.000
S ON
X 0.300 0.3389 0.0000 0.0550 0.0015 1.000 1.000
S WITH
I 0.000 -0.0543 0.0000 0.0691 0.0029 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 3.000 2.9447 0.0000 0.2064 0.0031 1.000 1.000
S 1.000 0.9920 0.0000 0.0617 0.0001 1.000 1.000
Residual Variances
Y1 0.500 0.6041 0.0000 0.0730 0.0108 1.000 1.000
Y2 0.500 0.5566 0.0000 0.0459 0.0032 1.000 1.000
Y3 0.500 0.4461 0.0000 0.0525 0.0029 1.000 1.000
Y4 0.500 0.5599 0.0000 0.0994 0.0036 1.000 1.000
I 1.000 0.9783 0.0000 0.1993 0.0005 1.000 1.000
S 0.500 0.4280 0.0000 0.0493 0.0052 1.000 1.000
Categorical Latent Variables
C#1 ON
X 1.000 0.7495 0.0000 0.3879 0.0628 1.000 0.000
Intercepts
C#1 0.000 -0.0266 0.0000 0.2946 0.0007 1.000 0.000
QUALITY OF NUMERICAL RESULTS
Average Condition Number for the Information Matrix 0.946E-02
(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 REGRESSION MODEL PART
ALPHA(C)
C#1 C#2
________ ________
14 0
GAMMA(C)
X
________
C#1 15
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
________ ________ ________
1.000 0.500 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 0.400
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
________ ________ ________
3.000 1.000 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 0.400
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 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
________ ________ ________
1.000 0.500 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 0.400
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
________ ________ ________
3.000 1.000 0.000
BETA
I S X
________ ________ ________
I 0.000 0.000 0.400
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 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.33443053D+04 0.0000000 0.0000000 EM
2 -0.33381092D+04 6.1961620 0.0018528 EM
3 -0.33380125D+04 0.0966931 0.0000290 EM
4 -0.33379447D+04 0.0677920 0.0000203 EM
5 -0.33378937D+04 0.0509670 0.0000153 EM
6 -0.33378543D+04 0.0394392 0.0000118 EM
7 -0.33378230D+04 0.0313216 0.0000094 EM
8 -0.33377975D+04 0.0254211 0.0000076 EM
9 -0.33377766D+04 0.0209841 0.0000063 EM
10 -0.33377590D+04 0.0175443 0.0000053 EM
11 -0.33377442D+04 0.0148051 0.0000044 EM
12 -0.33377316D+04 0.0125768 0.0000038 EM
13 -0.33377209D+04 0.0107351 0.0000032 EM
14 -0.33377117D+04 0.0091948 0.0000028 EM
15 -0.33377038D+04 0.0078955 0.0000024 EM
16 -0.33376970D+04 0.0067925 0.0000020 EM
17 -0.33376912D+04 0.0058524 0.0000018 EM
18 -0.33376861D+04 0.0050484 0.0000015 EM
19 -0.33376818D+04 0.0043589 0.0000013 EM
20 -0.33376780D+04 0.0037661 0.0000011 EM
21 -0.33376747D+04 0.0032560 0.0000010 EM
22 -0.33376719D+04 0.0028166 0.0000008 EM
23 -0.33376695D+04 0.0024375 0.0000007 EM
24 -0.33376674D+04 0.0021104 0.0000006 EM
25 -0.33376655D+04 0.0018277 0.0000005 EM
26 -0.33376640D+04 0.0015835 0.0000005 EM
27 -0.33376626D+04 0.0013722 0.0000004 EM
28 -0.33376614D+04 0.0011893 0.0000004 EM
29 -0.33376604D+04 0.0010311 0.0000003 EM
30 -0.33376595D+04 0.0008941 0.0000003 EM
31 -0.33376587D+04 0.0007754 0.0000002 EM
32 -0.33376580D+04 0.0006726 0.0000002 EM
33 -0.33376574D+04 0.0005835 0.0000002 EM
34 -0.33376569D+04 0.0005062 0.0000002 EM
35 -0.33376542D+04 0.0026963 0.0000008 FS
36 -0.33376537D+04 0.0005007 0.0000002 FS
37 -0.33376536D+04 0.0001022 0.0000000 FS
38 -0.33376536D+04 0.0000212 0.0000000 FS
39 -0.33376536D+04 0.0000043 0.0000000 FS
40 -0.33376536D+04 0.0000007 0.0000000 FS
41 -0.33376536D+04 0.0000023 0.0000000 EM
42 -0.33376536D+04 0.0000011 0.0000000 EM
43 -0.33376536D+04 0.0000006 0.0000000 EM
44 -0.33376536D+04 0.0000003 0.0000000 EM
45 -0.33376536D+04 0.0000002 0.0000000 EM
46 -0.33376536D+04 0.0000001 0.0000000 EM
47 -0.33376536D+04 0.0000001 0.0000000 EM
48 -0.33376536D+04 0.0000000 0.0000000 EM
49 -0.33376536D+04 0.0000000 0.0000000 EM
50 -0.33376536D+04 0.0000000 0.0000000 EM
51 -0.33376536D+04 0.0000000 0.0000000 EM
52 -0.33376536D+04 0.0000000 0.0000000 EM
53 -0.33376536D+04 0.0000000 0.0000000 EM
54 -0.33376536D+04 0.0000000 0.0000000 EM
55 -0.33376536D+04 0.0000000 0.0000000 EM
56 -0.33376536D+04 0.0000000 0.0000000 EM
57 -0.33376536D+04 0.0000000 0.0000000 EM
58 -0.33376536D+04 0.0000000 0.0000000 EM
TECHNICAL 9 OUTPUT
Error messages for each replication (if any)
SAVEDATA INFORMATION
Order of variables
Y1
Y2
Y3
Y4
X
C
Save file
ex8.2.dat
Save file format Free
Save file record length 10000
Beginning Time: 22:24:53
Ending Time: 22:24:53
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
Back to examples