Mplus VERSION 8.8
MUTHEN & MUTHEN
04/19/2022 10:24 PM
INPUT INSTRUCTIONS
title:
this is an example of mixture randomized
trials modeling using CACE estimation with
missing data on the latent class indicator
montecarlo:
names are u y x1 x2;
generate = u(1);
categorical = u;
! u is compliance status: 0/1 for noncomplying/complying
! u is a perfect indicator of c
missing = u;
cutpoints = x2(0);
! x2 is the 0/1 ctrl/tx dummy. Here split 50/50
genclasses = c(2);
classes = c(2);
nobs = 500;
seed = 3454367;
nrep = 1;
save = ex7.24.dat;
analysis:
type = mixture;
model population:
%overall%
x1-x2*1;
[x1-x2*0];
[c#1*0];
c#1 on x1*1;
y on x1*2 x2*.5;
[y*1]; y*1;
%c#1% !noncompliers
[u$1@15]; ! P(u = 1) = 0
y on x2@0;
[y*2];
y*2;
%c#2% !compliers
[u$1@-15]; ! P(u = 1) = 1
y on x2*.5;
[y*3];
y*1;
model missing:
%overall%
! the ctrl/tx dummy x2 determines u missingness
! note: model missing uses logistic regression
! parameterization with intercept and slope
[u@15]; ! prob missing = 1 for ctrls (x2=0)
u on x2@-30; ! prob missing = 0 for tx (x2=1)
model:
%overall%
[c#1*0];
c#1 on x1*1;
y on x1*2 x2*.5;
[y*1]; y*1;
%c#1% !noncompliers
[u$1@15]; ! P(u = 1 | c=1) = 0
y on x2@0;
[y*2];
y*2;
%c#2% !compliers
[u$1@-15]; ! P(u = 1 | c=2) = 1
y on x2*.5;
[y*3];
y*1;
output:
tech8 tech9;
INPUT READING TERMINATED NORMALLY
this is an example of mixture randomized
trials modeling using CACE estimation with
missing data on the latent class indicator
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 2
Number of independent variables 2
Number of continuous latent variables 0
Number of categorical latent variables 1
Observed dependent variables
Continuous
Y
Binary and ordered categorical (ordinal)
U
Observed independent variables
X1 X2
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
Maximum number of iterations for H1 2000
Convergence criterion for H1 0.100D-03
Optimization algorithm EMA
Link LOGIT
SUMMARY OF DATA FOR THE FIRST REPLICATION
Number of missing data patterns 2
Number of y missing data patterns 1
Number of u missing data patterns 2
SUMMARY OF MISSING DATA PATTERNS FOR THE FIRST REPLICATION
MISSING DATA PATTERNS (x = not missing)
1 2
U x
Y x x
X1 x x
X2 x x
MISSING DATA PATTERN FREQUENCIES
Pattern Frequency Pattern Frequency
1 247 2 253
MISSING DATA PATTERNS FOR U (x = not missing)
1 2
U x
MISSING DATA PATTERN FREQUENCIES FOR U
Pattern Frequency Pattern Frequency
1 247 2 253
MISSING DATA PATTERNS FOR Y (x = not missing)
1
Y x
X1 x
X2 x
MISSING DATA PATTERN FREQUENCIES FOR Y
Pattern Frequency
1 500
COVARIANCE COVERAGE OF DATA FOR THE FIRST REPLICATION
Minimum covariance coverage value 0.100
PROPORTION OF DATA PRESENT
Covariance Coverage
U Y X1 X2
________ ________ ________ ________
U 0.494
Y 0.494 1.000
X1 0.494 1.000 1.000
X2 0.494 1.000 1.000 1.000
PROPORTION OF DATA PRESENT FOR U
Covariance Coverage
U
________
U 0.494
PROPORTION OF DATA PRESENT FOR Y
Covariance Coverage
Y X1 X2
________ ________ ________
Y 1.000
X1 1.000 1.000
X2 1.000 1.000 1.000
SAMPLE STATISTICS FOR THE FIRST REPLICATION
ESTIMATED SAMPLE STATISTICS
Means
Y X1 X2
________ ________ ________
2.519 -0.061 0.494
Covariances
Y X1 X2
________ ________ ________
Y 4.592
X1 1.754 1.039
X2 0.086 -0.026 0.250
Correlations
Y X1 X2
________ ________ ________
Y 1.000
X1 0.803 1.000
X2 0.081 -0.052 1.000
MAXIMUM LOG-LIKELIHOOD VALUE FOR THE UNRESTRICTED (H1) MODEL IS -1902.367
MODEL FIT INFORMATION
Number of Free Parameters 8
Loglikelihood
H0 Value
Mean -920.329
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 -920.329 -920.329
0.980 0.000 -920.329 -920.329
0.950 0.000 -920.329 -920.329
0.900 0.000 -920.329 -920.329
0.800 0.000 -920.329 -920.329
0.700 0.000 -920.329 -920.329
0.500 0.000 -920.329 -920.329
0.300 0.000 -920.329 -920.329
0.200 0.000 -920.329 -920.329
0.100 0.000 -920.329 -920.329
0.050 0.000 -920.329 -920.329
0.020 0.000 -920.329 -920.329
0.010 0.000 -920.329 -920.329
Information Criteria
Akaike (AIC)
Mean 1856.658
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 1856.658 1856.658
0.980 0.000 1856.658 1856.658
0.950 0.000 1856.658 1856.658
0.900 0.000 1856.658 1856.658
0.800 0.000 1856.658 1856.658
0.700 0.000 1856.658 1856.658
0.500 0.000 1856.658 1856.658
0.300 0.000 1856.658 1856.658
0.200 0.000 1856.658 1856.658
0.100 0.000 1856.658 1856.658
0.050 0.000 1856.658 1856.658
0.020 0.000 1856.658 1856.658
0.010 0.000 1856.658 1856.658
Bayesian (BIC)
Mean 1890.375
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 1890.375 1890.375
0.980 0.000 1890.375 1890.375
0.950 0.000 1890.375 1890.375
0.900 0.000 1890.375 1890.375
0.800 0.000 1890.375 1890.375
0.700 0.000 1890.375 1890.375
0.500 0.000 1890.375 1890.375
0.300 0.000 1890.375 1890.375
0.200 0.000 1890.375 1890.375
0.100 0.000 1890.375 1890.375
0.050 0.000 1890.375 1890.375
0.020 0.000 1890.375 1890.375
0.010 0.000 1890.375 1890.375
Sample-Size Adjusted BIC (n* = (n + 2) / 24)
Mean 1864.983
Std Dev 0.000
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 0.000 1864.983 1864.983
0.980 0.000 1864.983 1864.983
0.950 0.000 1864.983 1864.983
0.900 0.000 1864.983 1864.983
0.800 0.000 1864.983 1864.983
0.700 0.000 1864.983 1864.983
0.500 0.000 1864.983 1864.983
0.300 0.000 1864.983 1864.983
0.200 0.000 1864.983 1864.983
0.100 0.000 1864.983 1864.983
0.050 0.000 1864.983 1864.983
0.020 0.000 1864.983 1864.983
0.010 0.000 1864.983 1864.983
Chi-Square Test of Model Fit for the Binary and Ordered Categorical
(Ordinal) Outcomes
Pearson Chi-Square
Mean 0.557
Std Dev 0.000
Degrees of freedom 0
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 1.000 0.000 0.557
0.980 1.000 0.000 0.557
0.950 1.000 0.000 0.557
0.900 1.000 0.000 0.557
0.800 1.000 0.000 0.557
0.700 1.000 0.000 0.557
0.500 1.000 0.000 0.557
0.300 1.000 0.000 0.557
0.200 1.000 0.000 0.557
0.100 1.000 0.000 0.557
0.050 1.000 0.000 0.557
0.020 1.000 0.000 0.557
0.010 1.000 0.000 0.557
Likelihood Ratio Chi-Square
Mean 0.558
Std Dev 0.000
Degrees of freedom 0
Number of successful computations 1
Proportions Percentiles
Expected Observed Expected Observed
0.990 1.000 0.000 0.558
0.980 1.000 0.000 0.558
0.950 1.000 0.000 0.558
0.900 1.000 0.000 0.558
0.800 1.000 0.000 0.558
0.700 1.000 0.000 0.558
0.500 1.000 0.000 0.558
0.300 1.000 0.000 0.558
0.200 1.000 0.000 0.558
0.100 1.000 0.000 0.558
0.050 1.000 0.000 0.558
0.020 1.000 0.000 0.558
0.010 1.000 0.000 0.558
Chi-Square Test for MCAR under the Unrestricted Latent Class Indicator Model
Pearson Chi-Square for MCAR
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 230.45489 0.46091
2 269.54511 0.53909
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON ESTIMATED POSTERIOR PROBABILITIES
Latent
Classes
1 230.45473 0.46091
2 269.54527 0.53909
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES
BASED ON THEIR MOST LIKELY LATENT CLASS MEMBERSHIP
Class Counts and Proportions
Latent
Classes
1 228 0.45600
2 272 0.54400
CLASSIFICATION QUALITY
Entropy 0.658
Average Latent Class Probabilities for Most Likely Latent Class Membership (Row)
by Latent Class (Column)
1 2
1 0.881 0.119
2 0.109 0.891
Classification Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 0.872 0.128
2 0.101 0.899
Logits for the Classification Probabilities for the Most Likely Latent Class Membership (Column)
by Latent Class (Row)
1 2
1 1.916 0.000
2 -2.190 0.000
MODEL RESULTS
ESTIMATES S. E. M. S. E. 95% % Sig
Population Average Std. Dev. Average Cover Coeff
Latent Class 1
Y ON
X1 2.000 1.9604 0.0000 0.0683 0.0016 1.000 1.000
X2 0.000 0.0000 0.0000 0.0000 0.0000 1.000 0.000
Intercepts
Y 2.000 2.1227 0.0000 0.1171 0.0151 1.000 1.000
Thresholds
U$1 15.000 15.0000 0.0000 0.0000 0.0000 1.000 0.000
Residual Variances
Y 2.000 1.9570 0.0000 0.1871 0.0018 1.000 1.000
Latent Class 2
Y ON
X1 2.000 1.9604 0.0000 0.0683 0.0016 1.000 1.000
X2 0.500 0.6281 0.0000 0.1504 0.0164 1.000 1.000
Intercepts
Y 3.000 2.7561 0.0000 0.1407 0.0595 1.000 1.000
Thresholds
U$1 -15.000 -15.0000 0.0000 0.0000 0.0000 1.000 0.000
Residual Variances
Y 1.000 0.9751 0.0000 0.0873 0.0006 1.000 1.000
Categorical Latent Variables
C#1 ON
X1 1.000 1.5412 0.0000 0.2054 0.2929 0.000 1.000
Intercepts
C#1 0.000 -0.1473 0.0000 0.1513 0.0217 1.000 0.000
QUALITY OF NUMERICAL RESULTS
Average Condition Number for the Information Matrix 0.285E-01
(ratio of smallest to largest eigenvalue)
TECHNICAL 1 OUTPUT
PARAMETER SPECIFICATION FOR LATENT CLASS 1
NU
Y X1 X2
________ ________ ________
0 0 0
LAMBDA
Y X1 X2
________ ________ ________
Y 0 0 0
X1 0 0 0
X2 0 0 0
THETA
Y X1 X2
________ ________ ________
Y 0
X1 0 0
X2 0 0 0
ALPHA
Y X1 X2
________ ________ ________
1 0 0
BETA
Y X1 X2
________ ________ ________
Y 0 2 0
X1 0 0 0
X2 0 0 0
PSI
Y X1 X2
________ ________ ________
Y 3
X1 0 0
X2 0 0 0
PARAMETER SPECIFICATION FOR LATENT CLASS 2
NU
Y X1 X2
________ ________ ________
0 0 0
LAMBDA
Y X1 X2
________ ________ ________
Y 0 0 0
X1 0 0 0
X2 0 0 0
THETA
Y X1 X2
________ ________ ________
Y 0
X1 0 0
X2 0 0 0
ALPHA
Y X1 X2
________ ________ ________
4 0 0
BETA
Y X1 X2
________ ________ ________
Y 0 2 5
X1 0 0 0
X2 0 0 0
PSI
Y X1 X2
________ ________ ________
Y 6
X1 0 0
X2 0 0 0
PARAMETER SPECIFICATION FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U$1
________
0
TAU(U) FOR LATENT CLASS 2
U$1
________
0
PARAMETER SPECIFICATION FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
C#1 C#2
________ ________
7 0
GAMMA(C)
X1 X2
________ ________
C#1 8 0
C#2 0 0
STARTING VALUES FOR LATENT CLASS 1
NU
Y X1 X2
________ ________ ________
0.000 0.000 0.000
LAMBDA
Y X1 X2
________ ________ ________
Y 1.000 0.000 0.000
X1 0.000 1.000 0.000
X2 0.000 0.000 1.000
THETA
Y X1 X2
________ ________ ________
Y 0.000
X1 0.000 0.000
X2 0.000 0.000 0.000
ALPHA
Y X1 X2
________ ________ ________
2.000 0.000 0.000
BETA
Y X1 X2
________ ________ ________
Y 0.000 2.000 0.000
X1 0.000 0.000 0.000
X2 0.000 0.000 0.000
PSI
Y X1 X2
________ ________ ________
Y 2.000
X1 0.000 0.500
X2 0.000 0.000 0.500
STARTING VALUES FOR LATENT CLASS 2
NU
Y X1 X2
________ ________ ________
0.000 0.000 0.000
LAMBDA
Y X1 X2
________ ________ ________
Y 1.000 0.000 0.000
X1 0.000 1.000 0.000
X2 0.000 0.000 1.000
THETA
Y X1 X2
________ ________ ________
Y 0.000
X1 0.000 0.000
X2 0.000 0.000 0.000
ALPHA
Y X1 X2
________ ________ ________
3.000 0.000 0.000
BETA
Y X1 X2
________ ________ ________
Y 0.000 2.000 0.500
X1 0.000 0.000 0.000
X2 0.000 0.000 0.000
PSI
Y X1 X2
________ ________ ________
Y 1.000
X1 0.000 0.500
X2 0.000 0.000 0.500
STARTING VALUES FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U$1
________
15.000
TAU(U) FOR LATENT CLASS 2
U$1
________
-15.000
STARTING VALUES FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
C#1 C#2
________ ________
0.000 0.000
GAMMA(C)
X1 X2
________ ________
C#1 1.000 0.000
C#2 0.000 0.000
POPULATION VALUES FOR LATENT CLASS 1
NU
Y X1 X2
________ ________ ________
0.000 0.000 0.000
LAMBDA
Y X1 X2
________ ________ ________
Y 1.000 0.000 0.000
X1 0.000 1.000 0.000
X2 0.000 0.000 1.000
THETA
Y X1 X2
________ ________ ________
Y 0.000
X1 0.000 0.000
X2 0.000 0.000 0.000
ALPHA
Y X1 X2
________ ________ ________
2.000 0.000 0.000
BETA
Y X1 X2
________ ________ ________
Y 0.000 2.000 0.000
X1 0.000 0.000 0.000
X2 0.000 0.000 0.000
PSI
Y X1 X2
________ ________ ________
Y 2.000
X1 0.000 1.000
X2 0.000 0.000 1.000
POPULATION VALUES FOR LATENT CLASS 2
NU
Y X1 X2
________ ________ ________
0.000 0.000 0.000
LAMBDA
Y X1 X2
________ ________ ________
Y 1.000 0.000 0.000
X1 0.000 1.000 0.000
X2 0.000 0.000 1.000
THETA
Y X1 X2
________ ________ ________
Y 0.000
X1 0.000 0.000
X2 0.000 0.000 0.000
ALPHA
Y X1 X2
________ ________ ________
3.000 0.000 0.000
BETA
Y X1 X2
________ ________ ________
Y 0.000 2.000 0.500
X1 0.000 0.000 0.000
X2 0.000 0.000 0.000
PSI
Y X1 X2
________ ________ ________
Y 1.000
X1 0.000 1.000
X2 0.000 0.000 1.000
POPULATION VALUES FOR LATENT CLASS INDICATOR MODEL PART
TAU(U) FOR LATENT CLASS 1
U$1
________
15.000
TAU(U) FOR LATENT CLASS 2
U$1
________
-15.000
POPULATION VALUES FOR LATENT CLASS REGRESSION MODEL PART
ALPHA(C)
C#1 C#2
________ ________
0.000 0.000
GAMMA(C)
X1 X2
________ ________
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.92780823D+03 0.0000000 0.0000000 EM
2 -0.92227007D+03 5.5381539 0.0059691 EM
3 -0.92096124D+03 1.3088368 0.0014191 EM
4 -0.92053160D+03 0.4296313 0.0004665 EM
5 -0.92039501D+03 0.1365967 0.0001484 EM
6 -0.92035141D+03 0.0435998 0.0000474 EM
7 -0.92033701D+03 0.0143948 0.0000156 EM
8 -0.92033202D+03 0.0049880 0.0000054 EM
9 -0.92033021D+03 0.0018151 0.0000020 EM
10 -0.92032952D+03 0.0006883 0.0000007 EM
11 -0.92032925D+03 0.0002690 0.0000003 EM
12 -0.92032914D+03 0.0001074 0.0000001 EM
13 -0.92032910D+03 0.0000435 0.0000000 EM
14 -0.92032908D+03 0.0000178 0.0000000 EM
15 -0.92032908D+03 0.0000073 0.0000000 EM
16 -0.92032907D+03 0.0000030 0.0000000 EM
17 -0.92032907D+03 0.0000012 0.0000000 EM
18 -0.92032907D+03 0.0000005 0.0000000 EM
19 -0.92032907D+03 0.0000002 0.0000000 EM
20 -0.92032907D+03 0.0000001 0.0000000 EM
21 -0.92032907D+03 0.0000000 0.0000000 EM
22 -0.92032907D+03 0.0000000 0.0000000 EM
23 -0.92032907D+03 0.0000000 0.0000000 EM
TECHNICAL 9 OUTPUT
Error messages for each replication (if any)
SAVEDATA INFORMATION
Order of variables
U
Y
X1
X2
C
Save file
ex7.24.dat
Save file format Free
Save file record length 10000
Missing designated by 999
Beginning Time: 22:24:34
Ending Time: 22:24:34
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