Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022 10:24 PM
INPUT INSTRUCTIONS
title: this is an example of a MZ-DZ AE twin model
for a binary outcome using logit and ML and doing
the 2 groups via 2 classes
montecarlo:
names = u1 u2 dz;
nobs = 5000;
generate = u1-u2(1 p) dz(1);
categorical = u1 u2 dz;
genclasses = cdz(2);
classes = cdz(2);
nreps = 1;
save = ex7.28.dat;
model population:
%overall%
[u1$1-u2$1*0] (1);
! factors are needed to correlate u1 and u2
! because off-diagonal Theta is not available
! with ML for categorical outcomes
f1 by u1@1;
f2 by u2@1;
[f1-f2@0];
f1-f2*2.7 (varf);
%cdz#1% ! mz class
[dz$1@15]; ! P(dz=1)=0
f1 WITH f2*2.69999(covmz); ! reduce true value of 2.7
! to avoid generating singular cov matrix for f
%cdz#2% ! dz class
[dz$1@-15]; ! P(dz=1)=1
f1 WITH f2*1.52(covdz);
analysis:
type = mixture;
algorithm = integration;
link = probit;
estimator = mlf;
model:
%overall%
[u1$1-u2$1*0] (1);
! factors are needed to correlate u1 and u2
! because off-diagonal Theta is not available
! with ML for categorical outcomes
f1 by u1;
f2 by u2;
[f1-f2@0];
f1-f2*2.7 (varf);
%cdz#1% ! mz class
[dz$1@15]; ! P(dz=1)=0
f1 WITH f2*2.7(covmz);
%cdz#2% ! dz class
[dz$1@-15]; ! P(dz=1)=1
f1 WITH f2*1.52(covdz);
model constraint:
NEW(a*2.36 c*.34 h*.64); ! a and c are variances here
! e is not a free parameter but is fixed at 1
varf = a + c + .001; ! add a ridge to avoid singularity
covmz = a + c;
covdz = 0.5*a + c;
h = a/(a + c + 1);
output:
tech8 tech9;
INPUT READING TERMINATED NORMALLY
this is an example of a MZ-DZ AE twin model
for a binary outcome using logit and ML and doing
the 2 groups via 2 classes
SUMMARY OF ANALYSIS
Number of groups 1
Number of observations 5000
Number of replications
Requested 1
Completed 1
Value of seed 0
Number of dependent variables 3
Number of independent variables 0
Number of continuous latent variables 2
Number of categorical latent variables 1
Observed dependent variables
Binary and ordered categorical (ordinal)
U1 U2 DZ
Continuous latent variables
F1 F2
Categorical latent variables
CDZ
Estimator MLF
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-02
Relative loglikelihood change 0.100D-05
Derivative 0.100D-02
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-02
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-02
Basis for M step termination ITERATION
Maximum value for logit thresholds 10
Minimum value for logit thresholds -10
Minimum expected cell size for chi-square 0.100D-01
Optimization algorithm EMA
Integration Specifications
Type STANDARD
Number of integration points 15
Dimensions of numerical integration 2
Adaptive quadrature ON
Link PROBIT
Cholesky ON
MODEL FIT INFORMATION
Number of Free Parameters 4
Loglikelihood
H0 Value
Mean -9927.559
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 -9927.559 -9927.559
0.980 0.000 -9927.559 -9927.559
0.950 0.000 -9927.559 -9927.559
0.900 0.000 -9927.559 -9927.559
0.800 0.000 -9927.559 -9927.559
0.700 0.000 -9927.559 -9927.559
0.500 0.000 -9927.559 -9927.559
0.300 0.000 -9927.559 -9927.559
0.200 0.000 -9927.559 -9927.559
0.100 0.000 -9927.559 -9927.559
0.050 0.000 -9927.559 -9927.559
0.020 0.000 -9927.559 -9927.559
0.010 0.000 -9927.559 -9927.559
Information Criteria
Akaike (AIC)
Mean 19863.118
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 19863.118 19863.118
0.980 0.000 19863.118 19863.118
0.950 0.000 19863.118 19863.118
0.900 0.000 19863.118 19863.118
0.800 0.000 19863.118 19863.118
0.700 0.000 19863.118 19863.118
0.500 0.000 19863.118 19863.118
0.300 0.000 19863.118 19863.118
0.200 0.000 19863.118 19863.118
0.100 0.000 19863.118 19863.118
0.050 0.000 19863.118 19863.118
0.020 0.000 19863.118 19863.118
0.010 0.000 19863.118 19863.118
Bayesian (BIC)
Mean 19889.187
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 19889.187 19889.187
0.980 0.000 19889.187 19889.187
0.950 0.000 19889.187 19889.187
0.900 0.000 19889.187 19889.187
0.800 0.000 19889.187 19889.187
0.700 0.000 19889.187 19889.187
0.500 0.000 19889.187 19889.187
0.300 0.000 19889.187 19889.187
0.200 0.000 19889.187 19889.187
0.100 0.000 19889.187 19889.187
0.050 0.000 19889.187 19889.187
0.020 0.000 19889.187 19889.187
0.010 0.000 19889.187 19889.187
Sample-Size Adjusted BIC (n* = (n + 2) / 24)
Mean 19876.476
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 19876.476 19876.476
0.980 0.000 19876.476 19876.476
0.950 0.000 19876.476 19876.476
0.900 0.000 19876.476 19876.476
0.800 0.000 19876.476 19876.476
0.700 0.000 19876.476 19876.476
0.500 0.000 19876.476 19876.476
0.300 0.000 19876.476 19876.476
0.200 0.000 19876.476 19876.476
0.100 0.000 19876.476 19876.476
0.050 0.000 19876.476 19876.476
0.020 0.000 19876.476 19876.476
0.010 0.000 19876.476 19876.476
Chi-Square Test of Model Fit for the Binary and Ordered Categorical
(Ordinal) Outcomes
Pearson Chi-Square
Mean 3.636
Std Dev 0.000
Degrees of freedom 3
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 1.000 0.115 3.636
0.980 1.000 0.185 3.636
0.950 1.000 0.352 3.636
0.900 1.000 0.584 3.636
0.800 1.000 1.005 3.636
0.700 1.000 1.424 3.636
0.500 1.000 2.366 3.636
0.300 0.000 3.665 3.636
0.200 0.000 4.642 3.636
0.100 0.000 6.251 3.636
0.050 0.000 7.815 3.636
0.020 0.000 9.837 3.636
0.010 0.000 11.345 3.636
Likelihood Ratio Chi-Square
Mean 3.639
Std Dev 0.000
Degrees of freedom 3
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 1.000 0.115 3.639
0.980 1.000 0.185 3.639
0.950 1.000 0.352 3.639
0.900 1.000 0.584 3.639
0.800 1.000 1.005 3.639
0.700 1.000 1.424 3.639
0.500 1.000 2.366 3.639
0.300 0.000 3.665 3.639
0.200 0.000 4.642 3.639
0.100 0.000 6.251 3.639
0.050 0.000 7.815 3.639
0.020 0.000 9.837 3.639
0.010 0.000 11.345 3.639
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON THE ESTIMATED MODEL
Latent
Classes
1 2566.00000 0.51320
2 2434.00000 0.48680
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON ESTIMATED POSTERIOR PROBABILITIES
Latent
Classes
1 2566.00000 0.51320
2 2434.00000 0.48680
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON THEIR MOST LIKELY LATENT CLASS MEMBERSHIP
Class Counts and Proportions
Latent
Classes
1 2566 0.51320
2 2434 0.48680
CLASSIFICATION QUALITY
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 Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 1.000 0.000
2 0.000 1.000
Logits for the Classification Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 13.816 0.000
2 -13.816 0.000
MODEL RESULTS
ESTIMATES S. E. M. S. E. 95% % Sig
Population Average Std. Dev. Average Cover Coeff
Latent Class 1
F1 BY
U1 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
F2 BY
U2 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
F2 WITH
F1 2.700 2.9283 0.0000 0.2696 0.0521 1.000 1.000
Means
F1 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
F2 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Thresholds
U1$1 0.000 0.0132 0.0000 0.0292 0.0002 1.000 0.000
U2$1 0.000 0.0132 0.0000 0.0292 0.0002 1.000 0.000
DZ$1 15.000 15.0000 0.0000 0.0000 0.0000 1.000 0.000
Variances
F1 2.700 2.9293 0.0000 0.2696 0.0526 1.000 1.000
F2 2.700 2.9293 0.0000 0.2696 0.0526 1.000 1.000
Latent Class 2
F1 BY
U1 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
F2 BY
U2 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000
F2 WITH
F1 1.520 1.5256 0.0000 0.1529 0.0000 1.000 1.000
Means
F1 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
F2 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Thresholds
U1$1 0.000 0.0132 0.0000 0.0292 0.0002 1.000 0.000
U2$1 0.000 0.0132 0.0000 0.0292 0.0002 1.000 0.000
DZ$1 -15.000 -15.0000 0.0000 0.0000 0.0000 1.000 0.000
Variances
F1 2.700 2.9293 0.0000 0.2696 0.0526 1.000 1.000
F2 2.700 2.9293 0.0000 0.2696 0.0526 1.000 1.000
Categorical Latent Variables
Means
CDZ#1 0.000 0.0528 0.0000 0.0283 0.0028 1.000 0.000
New/Additional Parameters
A 2.360 2.8055 0.0000 0.3982 0.1984 1.000 1.000
C 0.340 0.1228 0.0000 0.2310 0.0472 1.000 0.000
H 0.640 0.7142 0.0000 0.0667 0.0055 1.000 1.000
QUALITY OF NUMERICAL RESULTS
Average Condition Number for the Information Matrix 0.795E-03
(ratio of smallest to largest eigenvalue)
TECHNICAL 1 OUTPUT
PARAMETER SPECIFICATION FOR LATENT CLASS 1
NU
U1 U2 DZ
________ ________ ________
0 0 0
LAMBDA
F1 F2
________ ________
U1 0 0
U2 0 0
DZ 0 0
THETA
U1 U2 DZ
________ ________ ________
U1 0
U2 0 0
DZ 0 0 0
ALPHA
F1 F2
________ ________
0 0
BETA
F1 F2
________ ________
F1 0 0
F2 0 0
PSI
F1 F2
________ ________
F1 1
F2 2 1
PARAMETER SPECIFICATION FOR LATENT CLASS 2
NU
U1 U2 DZ
________ ________ ________
0 0 0
LAMBDA
F1 F2
________ ________
U1 0 0
U2 0 0
DZ 0 0
THETA
U1 U2 DZ
________ ________ ________
U1 0
U2 0 0
DZ 0 0 0
ALPHA
F1 F2
________ ________
0 0
BETA
F1 F2
________ ________
F1 0 0
F2 0 0
PSI
F1 F2
________ ________
F1 1
F2 3 1
PARAMETER SPECIFICATION FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U1$1 U2$1 DZ$1
________ ________ ________
4 4 0
TAU(U) FOR LATENT CLASS 2
U1$1 U2$1 DZ$1
________ ________ ________
4 4 0
PARAMETER SPECIFICATION FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
CDZ#1 CDZ#2
________ ________
5 0
GAMMA(C)
F1 F2
________ ________
CDZ#1 0 0
CDZ#2 0 0
PARAMETER SPECIFICATION FOR THE ADDITIONAL PARAMETERS
NEW/ADDITIONAL PARAMETERS
A C H
________ ________ ________
6 7 8
STARTING VALUES FOR LATENT CLASS 1
NU
U1 U2 DZ
________ ________ ________
0.000 0.000 0.000
LAMBDA
F1 F2
________ ________
U1 1.000 0.000
U2 0.000 1.000
DZ 0.000 0.000
THETA
U1 U2 DZ
________ ________ ________
U1 1.000
U2 0.000 1.000
DZ 0.000 0.000 1.000
ALPHA
F1 F2
________ ________
0.000 0.000
BETA
F1 F2
________ ________
F1 0.000 0.000
F2 0.000 0.000
PSI
F1 F2
________ ________
F1 2.700
F2 2.700 2.700
STARTING VALUES FOR LATENT CLASS 2
NU
U1 U2 DZ
________ ________ ________
0.000 0.000 0.000
LAMBDA
F1 F2
________ ________
U1 1.000 0.000
U2 0.000 1.000
DZ 0.000 0.000
THETA
U1 U2 DZ
________ ________ ________
U1 1.000
U2 0.000 1.000
DZ 0.000 0.000 1.000
ALPHA
F1 F2
________ ________
0.000 0.000
BETA
F1 F2
________ ________
F1 0.000 0.000
F2 0.000 0.000
PSI
F1 F2
________ ________
F1 2.700
F2 1.520 2.700
STARTING VALUES FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U1$1 U2$1 DZ$1
________ ________ ________
0.000 0.000 15.000
TAU(U) FOR LATENT CLASS 2
U1$1 U2$1 DZ$1
________ ________ ________
0.000 0.000 -15.000
STARTING VALUES FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
CDZ#1 CDZ#2
________ ________
0.000 0.000
GAMMA(C)
F1 F2
________ ________
CDZ#1 0.000 0.000
CDZ#2 0.000 0.000
STARTING VALUES FOR THE ADDITIONAL PARAMETERS
NEW/ADDITIONAL PARAMETERS
A C H
________ ________ ________
2.360 0.340 0.640
POPULATION VALUES FOR LATENT CLASS 1
NU
U1 U2 DZ
________ ________ ________
0.000 0.000 0.000
LAMBDA
F1 F2
________ ________
U1 1.000 0.000
U2 0.000 1.000
DZ 0.000 0.000
THETA
U1 U2 DZ
________ ________ ________
U1 0.000
U2 0.000 0.000
DZ 0.000 0.000 0.000
ALPHA
F1 F2
________ ________
0.000 0.000
BETA
F1 F2
________ ________
F1 0.000 0.000
F2 0.000 0.000
PSI
F1 F2
________ ________
F1 2.700
F2 2.700 2.700
POPULATION VALUES FOR LATENT CLASS 2
NU
U1 U2 DZ
________ ________ ________
0.000 0.000 0.000
LAMBDA
F1 F2
________ ________
U1 1.000 0.000
U2 0.000 1.000
DZ 0.000 0.000
THETA
U1 U2 DZ
________ ________ ________
U1 0.000
U2 0.000 0.000
DZ 0.000 0.000 0.000
ALPHA
F1 F2
________ ________
0.000 0.000
BETA
F1 F2
________ ________
F1 0.000 0.000
F2 0.000 0.000
PSI
F1 F2
________ ________
F1 2.700
F2 1.520 2.700
POPULATION VALUES FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U1$1 U2$1 DZ$1
________ ________ ________
0.000 0.000 15.000
TAU(U) FOR LATENT CLASS 2
U1$1 U2$1 DZ$1
________ ________ ________
0.000 0.000 -15.000
POPULATION VALUES FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
CDZ#1 CDZ#2
________ ________
0.000 0.000
GAMMA(C)
F1 F2
________ ________
CDZ#1 0.000 0.000
CDZ#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.99301738D+04 0.0000000 0.0000000 EM
2 -0.99283133D+04 1.8605409 0.0001874 EM
3 -0.99282318D+04 0.0814410 0.0000082 EM
4 -0.99281741D+04 0.0577953 0.0000058 EM
5 -0.99281294D+04 0.0446834 0.0000045 EM
6 -0.99275558D+04 0.5735831 0.0000578 FS
7 -0.99275590D+04 -0.0032263 -0.0000003 EM
TECHNICAL 9 OUTPUT
Error messages for each replication (if any)
SAVEDATA INFORMATION
Order of variables
U1
U2
DZ
CDZ
Save file
ex7.28.dat
Save file format Free
Save file record length 10000
Beginning Time: 22:24:35
Ending Time: 22:24:36
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