Table 3.2 on page 28 using pleural thickening data. In general, the AIC and BIC displayed in the book is the difference between the AIC for the specific model and the AIC for the unconstrained model and Mplus displays the AIC and BIC for each specific model alone. We can convert Mplus version of AIC and BIC back to the results in the book by taking the difference. For example, for unconstrained model, Mplus gives AIC as 1796.286 and for homogeneous 1815.697. The difference of these two gives 19.411 which is what in Table 3.2 for AIC of homogeneous model.
Model I: unconstrained
data: file is https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_1.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes=cl(2); weight is freq (freq); analysis: type = mixture ; starts = 0; model: %overall% [A$1*10 B$1*10 C$1*10]; %cl#1% [A$1*-10 B$1*-10 C$1*-10]; THE MODEL ESTIMATION TERMINATED NORMALLY TESTS OF MODEL FIT Loglikelihood H0 Value -891.143 Information Criteria Number of Free Parameters 7 Akaike (AIC) 1796.286 Bayesian (BIC) 1834.321 Sample-Size Adjusted BIC 1812.083 (n* = (n + 2) / 24) Entropy 0.949 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 0.000 Degrees of Freedom 0 P-Value 1.0000 Likelihood Ratio Chi-Square Value 0.000 Degrees of Freedom 0 P-Value 1.0000 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 92.18101 0.05448 2 1599.81899 0.94552 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.251 0.067 3.727 Category 2 0.749 0.067 11.127 B Category 1 0.356 0.067 5.357 Category 2 0.644 0.067 9.670 C Category 1 0.235 0.067 3.531 Category 2 0.765 0.067 11.495 Latent Class 2 A Category 1 0.990 0.003 285.156 Category 2 0.010 0.003 2.871 B Category 1 0.965 0.005 194.842 Category 2 0.035 0.005 7.157 C Category 1 0.989 0.004 271.551 Category 2 0.011 0.004 3.000
Model II: Homogeneous
data: file is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_1.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes=cl(2); weight is freq (freq); analysis: type = mixture ; starts = 0; model: %overall% [A$1*10 B$1*10 C$1*10] (1); %cl#1% [A$1*-10 B$1*-10 C$1*-10] (2); TESTS OF MODEL FIT Loglikelihood H0 Value -904.848 Information Criteria Number of Free Parameters 3 Akaike (AIC) 1815.697 Bayesian (BIC) 1831.998 Sample-Size Adjusted BIC 1822.467 (n* = (n + 2) / 24) Entropy 0.942 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 29.355 Degrees of Freedom 4 P-Value 0.0000 Likelihood Ratio Chi-Square Value 27.411 Degrees of Freedom 4 P-Value 0.0000 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 92.36555 0.05459 2 1599.63445 0.94541 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.283 0.049 5.801 Category 2 0.717 0.049 14.668 B Category 1 0.283 0.049 5.801 Category 2 0.717 0.049 14.668 C Category 1 0.283 0.049 5.801 Category 2 0.717 0.049 14.668 Latent Class 2 A Category 1 0.981 0.003 377.675 Category 2 0.019 0.003 7.254 B Category 1 0.981 0.003 377.675 Category 2 0.019 0.003 7.254 C Category 1 0.981 0.003 377.675 Category 2 0.019 0.003 7.254
Model III: Reader B, heterogeneous
data: file is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_1.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes=cl(2); weight is freq (freq); analysis: type = mixture ; starts = 0; model: %overall% [A$1*10 C$1*10] (1); [B$1*10]; %cl#1% [A$1*-10 C$1*-10] (2); [B$1*-10]; TESTS OF MODEL FIT Loglikelihood H0 Value -891.210 Information Criteria Number of Free Parameters 5 Akaike (AIC) 1792.420 Bayesian (BIC) 1819.588 Sample-Size Adjusted BIC 1803.704 (n* = (n + 2) / 24) Entropy 0.949 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 0.134 Degrees of Freedom 2 P-Value 0.9350 Likelihood Ratio Chi-Square Value 0.134 Degrees of Freedom 2 P-Value 0.9350 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 92.19087 0.05449 2 1599.80913 0.94551 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.243 0.053 4.612 Category 2 0.757 0.053 14.363 B Category 1 0.356 0.067 5.357 Category 2 0.644 0.067 9.670 C Category 1 0.243 0.053 4.612 Category 2 0.757 0.053 14.363 Latent Class 2 A Category 1 0.990 0.003 372.068 Category 2 0.010 0.003 3.928 B Category 1 0.965 0.005 194.830 Category 2 0.035 0.005 7.155 C Category 1 0.990 0.003 372.068 Category 2 0.010 0.003 3.928
Model IV: Reader B, false negative
data: file is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_1.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes=cl(2); weight is freq (freq); analysis: type = mixture ; starts = 0; model: model: %overall% [A$1*10 B$1*10 C$1*10] (1); %cl#1% [A$1*-10 C$1*-10] (2); [B$1*-10]; TESTS OF MODEL FIT
Loglikelihood
H0 Value -904.768
Information Criteria
Number of Free Parameters 4 Akaike (AIC) 1817.536 Bayesian (BIC) 1839.271 Sample-Size Adjusted BIC 1826.563 (n* = (n + 2) / 24) Entropy 0.947
Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes
Pearson Chi-Square
Value 29.180 Degrees of Freedom 3 P-Value 0.0000
Likelihood Ratio Chi-Square
Value 27.251 Degrees of Freedom 3 P-Value 0.0000
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL
Latent Classes
1 90.14024 0.05327 2 1601.85976 0.94673 RESULTS IN PROBABILITY SCALE
Latent Class 1
A Category 1 0.262 0.088 2.998 Category 2 0.738 0.088 8.430 B Category 1 0.295 0.054 5.475 Category 2 0.705 0.054 13.072 C Category 1 0.262 0.088 2.998 Category 2 0.738 0.088 8.430
Latent Class 2
A Category 1 0.981 0.003 339.540 Category 2 0.019 0.003 6.663 B Category 1 0.981 0.003 339.540 Category 2 0.019 0.003 6.663 C Category 1 0.981 0.003 339.540 Category 2 0.019 0.003 6.663
Model V: Reader B, false positive
data: file is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_1.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes=cl(2); weight is freq (freq); analysis: type = mixture ; starts = 0; model: %overall% [A$1*10 C$1*10] (1); [B$1*10]; %cl#1% [A$1*-10 B$1*-10 C$1*-10] (2); TESTS OF MODEL FIT Loglikelihood H0 Value -892.636 Information Criteria Number of Free Parameters 4 Akaike (AIC) 1793.273 Bayesian (BIC) 1815.007 Sample-Size Adjusted BIC 1802.300 (n* = (n + 2) / 24) Entropy 0.945 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 3.111 Degrees of Freedom 3 P-Value 0.3748 Likelihood Ratio Chi-Square Value 2.987 Degrees of Freedom 3 P-Value 0.3936 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 93.50052 0.05526 2 1598.49948 0.94474 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.287 0.049 5.839 Category 2 0.713 0.049 14.532 B Category 1 0.287 0.049 5.839 Category 2 0.713 0.049 14.532 C Category 1 0.287 0.049 5.839 Category 2 0.713 0.049 14.532 Latent Class 2 A Category 1 0.989 0.003 382.510 Category 2 0.011 0.003 4.168 B Category 1 0.966 0.005 194.568 Category 2 0.034 0.005 6.860 C Category 1 0.989 0.003 382.510 Category 2 0.011 0.003 4.168
Cheating Data Example on page 30 using raw data https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_4.dat.
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_4.dat ; Variable: names are a b c d freq; missing are all (-9999) ; weight is freq (freq); categorical are a b c d; classes = cl(2); Analysis: Type = mixture ; starts = 0; Model: %overall% [a$1*10 b$1*10 c$1*10 d$1*10]; %cl#1% [a$1*-10 b$1*-10 c$1*-10 d$1*-10]; TESTS OF MODEL FIT Loglikelihood H0 Value -440.027 Information Criteria Number of Free Parameters 9 Akaike (AIC) 898.054 Bayesian (BIC) 931.941 Sample-Size Adjusted BIC 903.395 (n* = (n + 2) / 24) Entropy 0.737 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 8.323 Degrees of Freedom 6 P-Value 0.2154 Likelihood Ratio Chi-Square Value 7.764 Degrees of Freedom 6 P-Value 0.2559 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.423 0.180 2.346 Category 2 0.577 0.180 3.199 B Category 1 0.411 0.175 2.350 Category 2 0.589 0.175 3.369 C Category 1 0.784 0.085 9.272 Category 2 0.216 0.085 2.555 D Category 1 0.624 0.100 6.218 Category 2 0.376 0.100 3.752 Latent Class 2 A Category 1 0.983 0.029 34.212 Category 2 0.017 0.029 0.578 B Category 1 0.971 0.030 31.849 Category 2 0.029 0.030 0.959 C Category 1 0.963 0.015 63.319 Category 2 0.037 0.015 2.439 D Category 1 0.818 0.026 31.148 Category 2 0.182 0.026 6.928
We can also obtain Bootstrap estimates of standard error by using the option "bootstrap =" in the analysis statement as shown below. Here we used "bootstrap = 50" to request 50 bootstrap draws to be used in the computation.
Data: File is c:daytonstata_data_fileshttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_4.dat ; Variable: names are a b c d freq; missing are all (-9999) ; weight is freq (freq); categorical are a b c d; classes = cl(2); Analysis: Type = mixture ; starts = 0; bootstrap = 50; estimator = ML; Model: %overall% [a$1*10 b$1*10 c$1*10 d$1*10]; %cl#1% [a$1*-10 b$1*-10 c$1*-10 d$1*-10];
RESULTS IN PROBABILITY SCALE
Latent Class 1
A Category 1 0.423 0.190 2.228 Category 2 0.577 0.190 3.038 B Category 1 0.411 0.172 2.395 Category 2 0.589 0.172 3.433 C Category 1 0.784 0.076 10.371 Category 2 0.216 0.076 2.858 D Category 1 0.624 0.114 5.487 Category 2 0.376 0.114 3.312
Latent Class 2
A Category 1 0.983 0.019 51.328 Category 2 0.017 0.019 0.867 B Category 1 0.971 0.026 37.457 Category 2 0.029 0.026 1.128 C Category 1 0.963 0.016 58.393 Category 2 0.037 0.016 2.250 D Category 1 0.818 0.026 32.035 Category 2 0.182 0.026 7.125
Table 3.5, 3.6 and 3.7 are omitted for now since Mplus does not provide those estimates.
Table 3.8 on page 39 using the academic cheating data with a single latent variable of two classes.
We first create a data file containing the latent classification probabilities and the modal class using the savedata statement of Mplus.
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table3_4.dat ; Variable: names are a b c d freq; missing are all (-9999) ; weight is freq (freq); categorical are a b c d; classes = cl(2); Analysis: Type = mixture ; starts = 0; Model: %overall% [a$1*10 b$1*10 c$1*10 d$1*10]; %cl#1% [a$1*-10 b$1*-10 c$1*-10 d$1*-10]; savedata: file = cprob.dat; save = cprob;
Next, we simply copy and paste the content of data file cprob.dat to Stata do file editor and input it as a data set. Based on the output from the Mplus run, we create a sequence of variables representing the conditional probabilities. Based on the conditional probabilities and the latent class probabilities, we then create column 3 and 4 of Table 3.8.
clear input a b c d observed p1 p2 class 0.000 0.000 0.000 0.000 207.000 0.021 0.979 2.000 1.000 0.000 0.000 0.000 10.000 0.636 0.364 1.000 0.000 1.000 0.000 0.000 13.000 0.507 0.493 1.000 1.000 1.000 0.000 0.000 11.000 0.988 0.012 1.000 0.000 0.000 1.000 0.000 7.000 0.134 0.866 2.000 1.000 0.000 1.000 0.000 1.000 0.926 0.074 1.000 0.000 1.000 1.000 0.000 1.000 0.880 0.120 1.000 1.000 1.000 1.000 0.000 1.000 0.998 0.002 1.000 0.000 0.000 0.000 1.000 46.000 0.055 0.945 2.000 1.000 0.000 0.000 1.000 3.000 0.826 0.174 1.000 0.000 1.000 0.000 1.000 4.000 0.736 0.264 1.000 1.000 1.000 0.000 1.000 4.000 0.996 0.004 1.000 0.000 0.000 1.000 1.000 5.000 0.296 0.704 2.000 1.000 0.000 1.000 1.000 2.000 0.971 0.029 1.000 0.000 1.000 1.000 1.000 2.000 0.952 0.048 1.000 1.000 1.000 1.000 1.000 2.000 0.999 0.001 1.000 end gen a11 = .983 gen a12 = .423 gen b11 = .971 gen b12 = .411 gen c11 = .963 gen c12 = .784 gen d11 = .818 gen d12 = .624 gen px1 = .839 gen py1 = 1 gen py2 = 1 foreach var of varlist a b c d { replace py1 = py1*`var'11 if `var'==0 replace py2 = py2*`var'12 if `var'==0 replace py1 = py1*(1-`var'11) if `var'==1 replace py2 = py2*(1-`var'12) if `var'==1 } replace py1 = py1*px1 replace py2 = py2*(1-px1) gen odds = p1/p2 sort d c b a list a b c d observed py1 py2 class p2 odds, clean
a b c d observed py1 py2 class p2 odds 1. 0 0 0 0 207 .6308329 .0136933 2 .979 .0214505 2. 1 0 0 0 10 .0109096 .0186786 1 .364 1.747253 3. 0 1 0 0 13 .0188405 .0196238 1 .493 1.028398 4. 1 1 0 0 11 .0003258 .0267681 1 .012 82.33333 5. 0 0 1 0 7 .0242376 .0037726 2 .866 .1547344 6. 1 0 1 0 1 .0004192 .0051461 1 .074 12.51351 7. 0 1 1 0 1 .0007239 .0054065 1 .12 7.333333 8. 1 1 1 0 1 .0000125 .0073749 1 .002 499 9. 0 0 0 1 46 .1403564 .0082511 2 .945 .0582011 10. 1 0 0 1 3 .0024273 .0112551 1 .174 4.747127 11. 0 1 0 1 4 .0041919 .0118246 1 .264 2.787879 12. 1 1 0 1 4 .0000725 .0161295 1 .004 249 13. 0 0 1 1 5 .0053927 .0022733 2 .704 .4204546 14. 1 0 1 1 2 .0000933 .0031009 1 .029 33.48276 15. 0 1 1 1 2 .0001611 .0032578 1 .048 19.83333 16. 1 1 1 1 2 2.79e-06 .0044438 1 .001 998.9999
Table 3. 9 and Table 3.10 are omitted for the time being.
Table 4.1 on page 50 and Table 4.2 on page 51 using left-right clinical scale data using raw data file https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table4_1_nozero.dat. Notice that we requested TECH10 output to display the estimated frequencies.
Model I: Proctor
data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table4_1_nozero.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes = cl(4); weight is freq (freq); analysis: Type = mixture ; model: %overall% [a$1*1 b$1*1 c$1*1] (p1); %cl#1% [a$1*-1 b$1*-1 c$1*-1] (p2); %cl#2% [a$1*1] (p1) [b$1*-1 c$1*-1] (p2); %cl#3% [a$1*1 b$1*1] (p1) [c$1*-1] (p2); model constraint: p2 = -p1; output: tech10; TESTS OF MODEL FIT Loglikelihood H0 Value -746.102 Information Criteria Number of Free Parameters 4 Akaike (AIC) 1500.203 Bayesian (BIC) 1517.607 Sample-Size Adjusted BIC 1504.908 (n* = (n + 2) / 24) Entropy 0.944 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 3.586 Degrees of Freedom 3 P-Value 0.3098 Likelihood Ratio Chi-Square Value 5.440 Degrees of Freedom 3 P-Value 0.1422 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 173.25843 0.30237 2 71.02449 0.12395 3 260.89574 0.45532 4 67.82134 0.11836 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.991 0.003 349.008 Category 2 0.009 0.003 3.035 B Category 1 0.991 0.003 349.008 Category 2 0.009 0.003 3.035 C Category 1 0.991 0.003 349.008 Category 2 0.009 0.003 3.035 Latent Class 2 A Category 1 0.009 0.003 3.035 Category 2 0.991 0.003 349.008 B Category 1 0.991 0.003 349.008 Category 2 0.009 0.003 3.035 C Category 1 0.991 0.003 349.008 Category 2 0.009 0.003 3.035 Latent Class 3 A Category 1 0.009 0.003 3.035 Category 2 0.991 0.003 349.008 B Category 1 0.009 0.003 3.035 Category 2 0.991 0.003 349.008 C Category 1 0.991 0.003 349.008 Category 2 0.009 0.003 3.035 Latent Class 4 A Category 1 0.009 0.003 3.035 Category 2 0.991 0.003 349.008 B Category 1 0.009 0.003 3.035 Category 2 0.991 0.003 349.008 C Category 1 0.009 0.003 3.035 Category 2 0.991 0.003 349.008
MODEL FIT INFORMATION FOR THE LATENT CLASS INDICATOR MODEL PART
RESPONSE PATTERNS
No. Pattern No. Pattern No. Pattern No. Pattern 1 000 2 100 3 010 4 110 5 101 6 111
RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS
Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 170.00 169.44 0.05 0.00 1.13 2 73.00 72.89 0.01 0.00 0.23 3 6.00 3.69 1.21 1.45 5.84 4 254.00 255.40 0.12 0.01 -2.78 5 1.00 1.21 0.19 0.04 -0.38 6 69.00 68.30 0.09 0.01 1.41
Model II: Intrusion-Omission Error
data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table4_1_nozero.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes = cl(4); weight is freq (freq); analysis: Type = mixture ; starts = 0; model: %overall% [a$1*-10 b$1*-10 c$1*-10] (1); !for class 4 %cl#1% [a$1*10 b$1*10 c$1*10] (2); %cl#2% [a$1*-10] (1) [b$1*10 c$1*10] (2); %cl#3% [a$1*-10 b$1*-10] (1) [c$1*10] (2);
output: tech10; TESTS OF MODEL FIT Loglikelihood H0 Value -744.854 Information Criteria Number of Free Parameters 5 Akaike (AIC) 1499.707 Bayesian (BIC) 1521.462 Sample-Size Adjusted BIC 1505.589 (n* = (n + 2) / 24) Entropy 0.959 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 1.760 Degrees of Freedom 2 P-Value 0.4148 Likelihood Ratio Chi-Square Value 2.944 Degrees of Freedom 2 P-Value 0.2294 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 168.69989 0.29442 2 69.66926 0.12159 3 263.38416 0.45966 4 71.24670 0.12434 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 2 A Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 3 A Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 B Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 4 A Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 B Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 C Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771
RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 170.00 170.00 0.00 0.00 0.00 2 73.00 73.00 0.00 0.00 0.00 3 6.00 4.55 0.68 0.46 3.32 4 254.00 255.45 0.12 0.01 -2.89 5 1.00 1.20 0.19 0.03 -0.37 6 69.00 67.57 0.19 0.03 2.89
Model III: Variable-Specific Error
data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table4_1_nozero.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes = cl(4); weight is freq (freq); analysis: Type = mixture ; starts = 0; model: %overall% [a$1*-10] (p1); [b$1*-10] (p2); [c$1@-15] ; !for class 4 %cl#1% [a$1*10] (q1); [b$1*10] (q2); [c$1@15] ; %cl#2% [a$1*-10] (p1); [b$1*10] (q2); [c$1@15] ; %cl#3% [a$1*-10] (p1); [b$1*-10] (p2); [c$1@15] ; model constraint: p1 = -q1; p2 = -q2;
output: tech10; TESTS OF MODEL FIT Loglikelihood H0 Value -743.787 Information Criteria Number of Free Parameters 5 Akaike (AIC) 1497.573 Bayesian (BIC) 1519.328 Sample-Size Adjusted BIC 1503.455 (n* = (n + 2) / 24) Entropy 0.956 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 0.711 Degrees of Freedom 2 P-Value 0.7010 Likelihood Ratio Chi-Square Value 0.810 Degrees of Freedom 2 P-Value 0.6669 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 175.99997 0.30716 2 67.53883 0.11787 3 259.46127 0.45281 4 69.99993 0.12216 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 B Category 1 0.972 0.009 105.123 Category 2 0.028 0.009 3.079 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 2 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 0.972 0.009 105.123 Category 2 0.028 0.009 3.079 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 3 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 0.028 0.009 3.079 Category 2 0.972 0.009 105.123 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 4 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 0.028 0.009 3.079 Category 2 0.972 0.009 105.123 C Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000
RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 170.00 170.99 0.09 0.01 -1.98 2 73.00 73.00 0.00 0.00 0.00 3 6.00 5.01 0.45 0.20 2.17 4 254.00 254.00 0.00 0.00 0.00 5 1.00 1.99 0.70 0.49 -1.38 6 69.00 68.01 0.13 0.01 2.00
Model IV: Latent-Class Specific Error
data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table4_1_nozero.dat ; variable: names are a b c freq; missing are all (-9999) ; categorical are a b c; classes = cl(4); weight is freq (freq); analysis: Type = mixture ; starts = 0; model: %overall% [a$1@15 b$1@10 c$1@15]; !for class 4 %cl#1% [a$1@-15 b$1@-15 c$1@-15]; %cl#2% [a$1*-5 ] (p1); [b$1*5 c$1*5] (p2); %cl#3% [a$1*5 b$1*5] (q1); [c$1*-5] (q2); model constraint: p1 = -p2; q1 = -q2; output: tech10;
TESTS OF MODEL FIT Loglikelihood H0 Value -743.531 Information Criteria Number of Free Parameters 5 Akaike (AIC) 1497.061 Bayesian (BIC) 1518.816 Sample-Size Adjusted BIC 1502.943 (n* = (n + 2) / 24) Entropy 0.934 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 0.156 Degrees of Freedom 2 P-Value 0.9252 Likelihood Ratio Chi-Square Value 0.298 Degrees of Freedom 2 P-Value 0.8615 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 63.27073 0.11042 2 69.86503 0.12193 3 270.83218 0.47266 4 169.03207 0.29499 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 C Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 Latent Class 2 A Category 1 0.012 0.006 2.075 Category 2 0.988 0.006 164.884 B Category 1 0.988 0.006 164.884 Category 2 0.012 0.006 2.075 C Category 1 0.988 0.006 164.884 Category 2 0.012 0.006 2.075 Latent Class 3 A Category 1 0.022 0.007 3.011 Category 2 0.978 0.007 133.362 B Category 1 0.022 0.007 3.011 Category 2 0.978 0.007 133.362 C Category 1 0.978 0.007 133.362 Category 2 0.022 0.007 3.011 Latent Class 4 A Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000
RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 170.00 170.00 0.00 0.00 0.00 2 73.00 73.01 0.00 0.00 -0.02 3 6.00 5.74 0.11 0.01 0.54 4 254.00 254.13 0.01 0.00 -0.26 5 1.00 0.98 0.02 0.00 0.05 6 69.00 69.00 0.00 0.00 0.00
Table 4.3 on page 56 using Lazarsfeld-Stouffer Attitude data with raw data file https://stats.idre.ucla.edu/wp-content/uploads/2016/02/laz_sto.dat.
Model I: One intrinsically unscalable class model
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/laz_sto.dat ; Variable: names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(6); weight is freq (freq); Analysis: Type = mixture ; model: %overall% [a$1*-1 b$1*-1 c$1*-1 d$1*-1]; !for class 6 %cl#1% [a$1@15 b$1@15 c$1@15 d$1@15]; %cl#2% [a$1@-15 ]; [b$1@15 c$1@15 d$1@15];; %cl#3% [a$1@-15 b$1@-15]; [c$1@15 d$1@15]; %cl#4% [a$1@-15 b$1@-15 c$1@-15]; [d$1@15]; %cl#5% [a$1@-15 b$1@-15 c$1@-15 d$1@-15]; TESTS OF MODEL FIT Loglikelihood H0 Value -2357.211 Information Criteria Number of Free Parameters 9 Akaike (AIC) 4732.421 Bayesian (BIC) 4776.591 Sample-Size Adjusted BIC 4748.006 (n* = (n + 2) / 24) Entropy 0.822 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 26.085 Degrees of Freedom 6 P-Value 0.0002 Likelihood Ratio Chi-Square Value 26.500 Degrees of Freedom 6 P-Value 0.0002 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 49.78701 0.04979 2 11.23731 0.01124 3 0.00000 0.00000 4 78.89503 0.07890 5 188.01697 0.18802 6 672.06370 0.67206 RESULTS IN PROBABILITY SCALE Latent Class 1-5 (omitted here) Latent Class 6 A Category 1 0.304 0.024 12.866 Category 2 0.696 0.024 29.475 B Category 1 0.356 0.030 11.978 Category 2 0.644 0.030 21.708 C Category 1 0.466 0.030 15.346 Category 2 0.534 0.030 17.607 D Category 1 0.746 0.021 34.745 Category 2 0.254 0.021 11.856
Model II: Two intrinsically unscalable classes model. Notice that Mplus gets a better log likelihood. The estimated probabilities are somewhat different from the result in the book. This may be due to the different algorithms used in ML estimation.
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/laz_sto.dat ; Variable: names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(7); weight is freq (freq); Analysis: Type = mixture ; starts = 0; model: %overall% [a$1*-1 b$1*-1 c$1*-1 d$1*-2]; !for class 7 %cl#1% [a$1@15 b$1@15 c$1@15 d$1@15]; %cl#2% [a$1@-15 ]; [b$1@15 c$1@15 d$1@15]; %cl#3% [a$1@-15 b$1@-15]; [c$1@15 d$1@15]; %cl#4% [a$1@-15 b$1@-15 c$1@-15]; [d$1@15]; %cl#5% [a$1@-15 b$1@-15 c$1@-15 d$1@-15]; %cl#6% [a$1*1 b$1*1 c$1*1 d$1*8]; ONE OR MORE MULTINOMIAL LOGIT PARAMETERS WERE FIXED TO AVOID SINGULARITY OF THE INFORMATION MATRIX. THE SINGULARITY IS MOST LIKELY BECAUSE THE MODEL IS NOT IDENTIFIED, OR BECAUSE OF EMPTY CELLS IN THE JOINT DISTRIBUTION OF THE CATEGORICAL LATENT VARIABLES AND ANY INDEPENDENT VARIABLES. THE FOLLOWING PARAMETERS WERE FIXED: 10 THE MODEL ESTIMATION TERMINATED NORMALLY TESTS OF MODEL FIT Loglikelihood H0 Value -2345.748 Information Criteria Number of Free Parameters 14 Akaike (AIC) 4719.495 Bayesian (BIC) 4788.204 Sample-Size Adjusted BIC 4743.739 (n* = (n + 2) / 24) Entropy 0.776 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 3.975 Degrees of Freedom 1 P-Value 0.0462 Likelihood Ratio Chi-Square Value 3.574 Degrees of Freedom 1 P-Value 0.0587 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 25.43469 0.02543 2 0.00000 0.00000 3 20.78793 0.02079 4 134.55060 0.13455 5 137.93803 0.13794 6 478.91510 0.47892 7 202.37364 0.20237 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 2 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 3 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 4 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 C Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 5 A Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 B Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 C Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 D Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 Latent Class 6 A Category 1 0.416 0.046 9.069 Category 2 0.584 0.046 12.706 B Category 1 0.480 0.049 9.887 Category 2 0.520 0.049 10.703 C Category 1 0.539 0.037 14.389 Category 2 0.461 0.037 12.322 D Category 1 0.961 0.125 7.707 Category 2 0.039 0.125 0.316 Latent Class 7 A Category 1 0.144 0.116 1.244 Category 2 0.856 0.116 7.408 B Category 1 0.220 0.138 1.594 Category 2 0.780 0.138 5.639 C Category 1 0.345 0.110 3.132 Category 2 0.655 0.110 5.951 D Category 1 0.001 0.011 0.077 Category 2 0.999 0.011 87.746
Model III: intrusion-omission error model
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/laz_sto.dat ; Variable: names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(5); weight is freq (freq); Analysis: Type = mixture ; starts = 0; model: %overall% [a$1*-5 b$1*-5 c$1*-5 d$1*-5] (1) ; !for class 5 %cl#1% [a$1*5 b$1*5 c$1*5 d$1*5] (2); %cl#2% [a$1*-5] (1); [b$1*5 c$1*5 d$1*5] (2); %cl#3% [a$1*-5 b$1*-5] (1); [c$1*5 d$1*5] (2); %cl#4% [a$1*-5 b$1*-5 c$1*-5] (1); [d$1*5] (2); TESTS OF MODEL FIT Loglikelihood H0 Value -2379.713 Information Criteria Number of Free Parameters 6 Akaike (AIC) 4771.426 Bayesian (BIC) 4800.872 Sample-Size Adjusted BIC 4781.816 (n* = (n + 2) / 24) Entropy 0.461 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 63.313 Degrees of Freedom 9 P-Value 0.0000 Likelihood Ratio Chi-Square Value 71.505 Degrees of Freedom 9 P-Value 0.0000 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 192.62219 0.19262 2 80.34766 0.08035 3 127.35833 0.12736 4 337.63774 0.33764 5 262.03407 0.26203 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 B Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 C Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 D Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 Latent Class 2 A Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 B Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 C Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 D Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 Latent Class 3 A Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 B Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 C Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 D Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 Latent Class 4 A Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 B Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 C Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 D Category 1 0.787 0.026 30.031 Category 2 0.213 0.026 8.125 Latent Class 5 A Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 B Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 C Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232 D Category 1 0.128 0.018 7.078 Category 2 0.872 0.018 48.232
Model IV: variable-specific error model
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/laz_sto.dat ; Variable: names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(5); weight is freq (freq); Analysis: Type = mixture ; starts = 0; model: %overall% [a$1*-5] (p1); [b$1*-5] (p2); [c$1*-5] (p3); [d$1*-5] (p4); !for class 5 %cl#1% [a$1*5] (q1); [b$1*5] (q2); [c$1*5] (q3); [d$1*5] (q4); %cl#2% [a$1*-5] (p1); [b$1*5] (q2); [c$1*5] (q3); [d$1*5] (q4); %cl#3% [a$1*-5] (p1); [b$1*-5] (p2); [c$1*5] (q3); [d$1*5] (q4); %cl#4% [a$1*-5] (p1); [b$1*-5] (p2); [c$1*-5] (p3); [d$1*5] (q4); model constraint: p1 = -q1; p2 = -q2; p3 = -q3; p4 = -q4; TESTS OF MODEL FIT Loglikelihood H0 Value -2365.771 Information Criteria Number of Free Parameters 8 Akaike (AIC) 4747.542 Bayesian (BIC) 4786.804 Sample-Size Adjusted BIC 4761.396 (n* = (n + 2) / 24) Entropy 0.692 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 42.633 Degrees of Freedom 7 P-Value 0.0000 Likelihood Ratio Chi-Square Value 43.622 Degrees of Freedom 7 P-Value 0.0000 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 158.52423 0.15852 2 62.02713 0.06203 3 67.23843 0.06724 4 356.18533 0.35619 5 356.02489 0.35602 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.860 0.016 55.149 Category 2 0.140 0.016 8.963 B Category 1 0.819 0.018 46.149 Category 2 0.181 0.018 10.222 C Category 1 0.766 0.020 38.099 Category 2 0.234 0.020 11.668 D Category 1 0.990 0.004 234.405 Category 2 0.010 0.004 2.447 Latent Class 2 A Category 1 0.140 0.016 8.963 Category 2 0.860 0.016 55.149 B Category 1 0.819 0.018 46.149 Category 2 0.181 0.018 10.222 C Category 1 0.766 0.020 38.099 Category 2 0.234 0.020 11.668 D Category 1 0.990 0.004 234.405 Category 2 0.010 0.004 2.447 Latent Class 3 A Category 1 0.140 0.016 8.963 Category 2 0.860 0.016 55.149 B Category 1 0.181 0.018 10.222 Category 2 0.819 0.018 46.149 C Category 1 0.766 0.020 38.099 Category 2 0.234 0.020 11.668 D Category 1 0.990 0.004 234.405 Category 2 0.010 0.004 2.447 Latent Class 4 A Category 1 0.140 0.016 8.963 Category 2 0.860 0.016 55.149 B Category 1 0.181 0.018 10.222 Category 2 0.819 0.018 46.149 C Category 1 0.234 0.020 11.668 Category 2 0.766 0.020 38.099 D Category 1 0.990 0.004 234.405 Category 2 0.010 0.004 2.447 Latent Class 5 A Category 1 0.140 0.016 8.963 Category 2 0.860 0.016 55.149 B Category 1 0.181 0.018 10.222 Category 2 0.819 0.018 46.149 C Category 1 0.234 0.020 11.668 Category 2 0.766 0.020 38.099 D Category 1 0.010 0.004 2.447 Category 2 0.990 0.004 234.405
Model V: Intrusion-omission error and one intrinsically unscalable class model. Notice that Mplus gets a better log likelihood. The estimated probabilities are somewhat different from the result in the book. This may be due to the different algorithms used in ML estimation.
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/laz_sto.dat ; Variable: names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(6); weight is freq (freq); Analysis: Type = mixture ; model: %overall% [a$1*10 b$1*10 c$1*9 d$1*5]; ! for class 6; %cl#1% [a$1*-10 b$1*-10 c$1*-10 d$1*-10] (1); %cl#2% [a$1*5] (2); [b$1*-10 c$1*-10 d$1*-10] (1); %cl#3% [a$1*5 b$1*5] (2); [c$1*-10 d$1*-10] (1); %cl#4% [a$1*5 b$1*5 c$1*5] (2); [d$1*-10] (1); %cl#5% [a$1*5 b$1*5 c$1*5 d$1*5] (2); IN THE OPTIMIZATION, ONE OR MORE LOGIT THRESHOLDS APPROACHED AND WERE SET AT THE EXTREME VALUES. EXTREME VALUES ARE -15.000 AND 15.000. THE FOLLOWING THRESHOLDS WERE SET AT THESE VALUES: * THRESHOLD 1 OF CLASS INDICATOR D FOR CLASS 6 AT ITERATION 72 THE STANDARD ERRORS OF THE MODEL PARAMETER ESTIMATES MAY NOT BE TRUSTWORTHY FOR SOME PARAMETERS DUE TO A NON-POSITIVE DEFINITE FIRST-ORDER DERIVATIVE PRODUCT MATRIX. THIS MAY BE DUE TO THE STARTING VALUES BUT MAY ALSO BE AN INDICATION OF MODEL NONIDENTIFICATION. THE CONDITION NUMBER IS 0.470D-10. PROBLEM INVOLVING PARAMETER 11. THE MODEL ESTIMATION TERMINATED NORMALLY TESTS OF MODEL FIT Loglikelihood H0 Value -2345.938 Information Criteria Number of Free Parameters 11 Akaike (AIC) 4713.876 Bayesian (BIC) 4767.862 Sample-Size Adjusted BIC 4732.925 (n* = (n + 2) / 24) Entropy 0.511 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 3.909 Degrees of Freedom 4 P-Value 0.4185 Likelihood Ratio Chi-Square Value 3.956 Degrees of Freedom 4 P-Value 0.4121 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 110.86584 0.11087 2 73.79787 0.07380 3 129.17772 0.12918 4 313.11373 0.31311 5 0.01108 0.00001 6 373.03377 0.37303 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 B Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 C Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 D Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 Latent Class 2 A Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 B Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 C Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 D Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 Latent Class 3 A Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 B Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 C Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 D Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 Latent Class 4 A Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 B Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 C Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 D Category 1 0.424 0.033 12.929 Category 2 0.576 0.033 17.528 Latent Class 5 A Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 B Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 C Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 D Category 1 0.033 0.026 1.274 Category 2 0.967 0.026 37.240 Latent Class 6 A Category 1 0.509 0.040 12.807 Category 2 0.491 0.040 12.347 B Category 1 0.553 0.038 14.409 Category 2 0.447 0.038 11.627 C Category 1 0.624 0.035 17.792 Category 2 0.376 0.035 10.726 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000
Model VI: Variable-specific error and one intrinsically unscalable class model
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/laz_sto.dat ; Variable: names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(6); weight is freq (freq); Analysis: Type = mixture ; starts = 20 5; !use random starts; stseed = 123457; model: %overall% [a$1*-7 b$1*-5 c$1*-3 d$1*-1]; ! for class 6; %cl#1% [a$1*-5] (p1); [b$1*-5] (p2); [c$1*-5] (p3); [d$1*-5] (p4); %cl#2% [a$1*5] (q1); [b$1*-5] (p2); [c$1*-5] (p3); [d$1*-5] (p4); %cl#3% [a$1*5] (q1); [b$1*5] (q2); [c$1*-5] (p3); [d$1*-5] (p4); %cl#4% [a$1*5] (q1); [b$1*5] (q2); [c$1*5] (q3); [d$1*-5] (p4); %cl#5% [a$1*5] (q1); [b$1*5] (q2); [c$1*5] (q3); [d$1*5] (q4); model constraint: p1 = -q1; p2 = -q2; p3 = -q3; p4 = -q4; TESTS OF MODEL FIT Loglikelihood H0 Value -2344.772 Information Criteria Number of Free Parameters 13 Akaike (AIC) 4715.543 Bayesian (BIC) 4779.344 Sample-Size Adjusted BIC 4738.056 (n* = (n + 2) / 24) Entropy 0.505 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 1.593 Degrees of Freedom 2 P-Value 0.4510 Likelihood Ratio Chi-Square Value 1.623 Degrees of Freedom 2 P-Value 0.4442 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 179.78671 0.17979 2 50.80390 0.05080 3 90.36266 0.09036 4 185.10047 0.18510 5 145.45897 0.14546 6 348.48729 0.34849 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.757 0.050 15.159 Category 2 0.243 0.050 4.858 B Category 1 0.630 0.087 7.208 Category 2 0.370 0.087 4.233 C Category 1 0.665 0.051 13.174 Category 2 0.335 0.051 6.624 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 2 A Category 1 0.243 0.050 4.858 Category 2 0.757 0.050 15.159 B Category 1 0.630 0.087 7.208 Category 2 0.370 0.087 4.233 C Category 1 0.665 0.051 13.174 Category 2 0.335 0.051 6.624 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 3 A Category 1 0.243 0.050 4.858 Category 2 0.757 0.050 15.159 B Category 1 0.370 0.087 4.233 Category 2 0.630 0.087 7.208 C Category 1 0.665 0.051 13.174 Category 2 0.335 0.051 6.624 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 4 A Category 1 0.243 0.050 4.858 Category 2 0.757 0.050 15.159 B Category 1 0.370 0.087 4.233 Category 2 0.630 0.087 7.208 C Category 1 0.335 0.051 6.624 Category 2 0.665 0.051 13.174 D Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 5 A Category 1 0.243 0.050 4.858 Category 2 0.757 0.050 15.159 B Category 1 0.370 0.087 4.233 Category 2 0.630 0.087 7.208 C Category 1 0.335 0.051 6.624 Category 2 0.665 0.051 13.174 D Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 Latent Class 6 A Category 1 0.010 0.049 0.197 Category 2 0.990 0.049 20.195 B Category 1 0.000 0.000 0.000 Category 2 1.000 0.000 0.000 C Category 1 0.135 0.041 3.304 Category 2 0.865 0.041 21.114 D Category 1 0.387 0.063 6.135 Category 2 0.613 0.063 9.709
Table 4.4 on page 58 using Model VI in the example above. Notice that it should be model VI as explained in previous page instead of model V. This is the output requested with TECH10 in the above Mplus program for Model VI.
RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS
Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 75.00 73.21 0.22 0.04 3.62 2 69.00 68.62 0.05 0.00 0.76 3 55.00 55.40 0.05 0.00 -0.79 4 96.00 96.53 0.06 0.00 -1.07 5 42.00 45.07 0.47 0.21 -5.93 6 60.00 60.29 0.04 0.00 -0.58 7 45.00 42.96 0.32 0.10 4.17 8 199.00 198.92 0.01 0.00 0.16 9 3.00 4.37 0.66 0.43 -2.26 10 16.00 13.64 0.64 0.41 5.12 11 8.00 7.72 0.10 0.01 0.57 12 52.00 51.83 0.02 0.00 0.33 13 10.00 8.69 0.45 0.20 2.81 14 25.00 27.12 0.41 0.17 -4.07 15 16.00 16.58 0.14 0.02 -1.14 16 229.00 229.05 0.00 0.00 -0.10
Result on page 60 using Stouffer-Toby role conflict data of Table 4.6 on page 61. In this example, we show how to specify using a data set with individual records. You can download the data file following the link here.
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table4_6-1.dat ; Variable: Names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(5); weight is freq (freq); Analysis: Type = mixture ; starts = 0; model: Analysis: Type = mixture ; starts = 0; model: %overall% [a$1*-5] (p1); [b$1*-5] (p2); [c$1*-5] (p3); [d$1*-5] (p4); !for class 5 %cl#1% [a$1*5] (q1); [b$1*5] (q2); [c$1*5] (q3); [d$1*5] (q4); %cl#2% [a$1*-5] (p1); [b$1*5] (q2); [c$1*5] (q3); [d$1*5] (q4); %cl#3% [a$1*-5] (p1); [b$1*-5] (p2); [c$1*5] (q3); [d$1*5] (q4); %cl#4% [a$1*-5] (p1); [b$1*-5] (p2); [c$1*-5] (p3); [d$1*5] (q4); model constraint: p1 = -q1; p4 = -q4; TESTS OF MODEL FIT Loglikelihood H0 Value -503.568 Information Criteria Number of Free Parameters 10 Akaike (AIC) 1027.136 Bayesian (BIC) 1060.889 Sample-Size Adjusted BIC 1029.201 (n* = (n + 2) / 24) Entropy 0.724 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 0.895 Degrees of Freedom 5 P-Value 0.9706 Likelihood Ratio Chi-Square Value 0.921 Degrees of Freedom 5 P-Value 0.9687 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 51.64449 0.23909 2 3.80927 0.01764 3 22.18693 0.10272 4 94.84487 0.43910 5 43.51444 0.20146 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.864 0.035 24.530 Category 2 0.136 0.035 3.869 B Category 1 0.948 0.068 13.882 Category 2 0.052 0.068 0.763 C Category 1 0.940 0.066 14.310 Category 2 0.060 0.066 0.914 D Category 1 0.988 0.004 239.974 Category 2 0.012 0.004 2.796 Latent Class 2 A Category 1 0.136 0.035 3.869 Category 2 0.864 0.035 24.530 B Category 1 0.948 0.068 13.882 Category 2 0.052 0.068 0.763 C Category 1 0.940 0.066 14.310 Category 2 0.060 0.066 0.914 D Category 1 0.988 0.004 239.974 Category 2 0.012 0.004 2.796 Latent Class 3 A Category 1 0.136 0.035 3.869 Category 2 0.864 0.035 24.530 B Category 1 0.364 0.050 7.314 Category 2 0.636 0.050 12.782 C Category 1 0.940 0.066 14.310 Category 2 0.060 0.066 0.914 D Category 1 0.988 0.004 239.974 Category 2 0.012 0.004 2.796 Latent Class 4 A Category 1 0.136 0.035 3.869 Category 2 0.864 0.035 24.530 B Category 1 0.364 0.050 7.314 Category 2 0.636 0.050 12.782 C Category 1 0.253 0.069 3.678 Category 2 0.747 0.069 10.852 D Category 1 0.988 0.004 239.974 Category 2 0.012 0.004 2.796 Latent Class 5 A Category 1 0.136 0.035 3.869 Category 2 0.864 0.035 24.530 B Category 1 0.364 0.050 7.314 Category 2 0.636 0.050 12.782 C Category 1 0.253 0.069 3.678 Category 2 0.747 0.069 10.852 D Category 1 0.012 0.004 2.796 Category 2 0.988 0.004 239.974
Model of one intrinsically unscalable class is fitted to Stouffer-Toby data (page 61).
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table4_6-1.dat ; Variable: Names are a b c d freq; missing are all (-9999) ; categorical are a b c d; classes = cl(6); weight is freq (freq); Analysis: Type = mixture ; starts = 0; model: Analysis: Type = mixture ; starts = 0; model: %overall% [a$1*-5 b$1*-5 c$1*-5 d$1*-5] ; !for class 6 %cl#1% [a$1@15 b$1@15 c$1@15 d$1@15]; %cl#2% [a$1@-15 b$1@15 c$1@15 d$1@15]; %cl#3% [a$1@-15 b$1@-15 c$1@15 d$1@15]; %cl#4% [a$1@-15 b$1@-15 c$1@-15 d$1@15]; %cl#5% [a$1@-15 b$1@-15 c$1@-15 d$1@-15]; TESTS OF MODEL FIT Loglikelihood H0 Value -503.602 Information Criteria Number of Free Parameters 9 Akaike (AIC) 1025.204 Bayesian (BIC) 1055.581 Sample-Size Adjusted BIC 1027.062 (n* = (n + 2) / 24) Entropy 0.814 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 1.005 Degrees of Freedom 6 P-Value 0.9854 Likelihood Ratio Chi-Square Value 0.988 Degrees of Freedom 6 P-Value 0.9860 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 38.26154 0.17714 2 7.55784 0.03499 3 5.51063 0.02551 4 6.78175 0.03140 5 10.44380 0.04835 6 147.44445 0.68261
Latent markov model example — to be done
Located latent class model example — to be done
T-class mixture model example — to be done
Table 5.1 on page 69 using IEA bus data. We requested TECH10 for expected frequencies. Column labeled as "Disc" can be obtained by squaring the column below labeled as "Standard Residual" in the part of the output titled as RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS.
Model I: linear scale
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table5_1.dat ; Variable: Names are a b c d freq; Missing are all (-9999) ; categorical are a b c d; weight is freq (freq); classes = cl(5); Analysis: Type = mixture ; model: %overall% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*10] (p4); %cl#1% [a$1*-10] (q1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#2% [a$1*10] (p1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#3% [a$1*10] (p1); [b$1*10] (p2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#4% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*-10] (q4); model constraint: p1 = -q1; p2 = -q2; p3 = -q3; p4 = -q4; output: TECH10;
TESTS OF MODEL FIT Loglikelihood H0 Value -12930.791 Information Criteria Number of Free Parameters 8 Akaike (AIC) 25877.581 Bayesian (BIC) 25931.643 Sample-Size Adjusted BIC 25906.221 (n* = (n + 2) / 24) Entropy 0.600 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 40.367 Degrees of Freedom 7 P-Value 0.0000 Likelihood Ratio Chi-Square Value 46.849 Degrees of Freedom 7 P-Value 0.0000
TECHNICAL 10 OUTPUT MODEL FIT INFORMATION FOR THE LATENT CLASS INDICATOR MODEL PART RESPONSE PATTERNS No. Pattern No. Pattern No. Pattern No. Pattern 1 0000 2 1000 3 0100 4 1100 5 0010 6 1010 7 0110 8 1110 9 0001 10 1001 11 0101 12 1101 13 0011 14 1011 15 0111 16 1111 RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 1138.00 1148.73 0.35 0.10 -21.37 2 1532.00 1532.94 0.03 0.00 -1.87 3 502.00 467.06 1.68 2.61 72.43 4 1354.00 1376.74 0.69 0.38 -45.10 5 75.00 69.79 0.63 0.39 10.81 6 200.00 220.75 1.42 1.95 -39.48 7 198.00 182.67 1.15 1.29 31.91 8 852.00 852.32 0.01 0.00 -0.65 9 13.00 23.31 2.14 4.56 -15.18 10 43.00 32.27 1.89 3.57 24.69 11 9.00 10.89 0.57 0.33 -3.42 12 37.00 34.95 0.35 0.12 4.21 13 15.00 13.10 0.53 0.28 4.07 14 59.00 60.60 0.21 0.04 -3.15 15 23.00 57.46 4.57 20.67 -42.12 16 309.00 275.43 2.07 4.09 71.08
Model II: biform scale
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table5_1.dat ; Variable: Names are a b c d freq; Missing are all (-9999) ; categorical are a b c d; weight is freq (freq); classes = cl(6); Analysis: Type = mixture ; model: %overall% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*10] (p4); %cl#1% [a$1*-10] (q1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#2% [a$1*10] (p1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#3% [a$1*-10] (q1); [b$1*10] (p2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#4% [a$1*10] (p1); [b$1*10] (p2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#5% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*-10] (q4); model constraint: p1 = -q1; p2 = -q2; p3 = -q3; p4 = -q4; output: tech10;
TESTS OF MODEL FIT Loglikelihood H0 Value -12927.166 Information Criteria Number of Free Parameters 9 Akaike (AIC) 25872.333 Bayesian (BIC) 25933.151 Sample-Size Adjusted BIC 25904.552 (n* = (n + 2) / 24) Entropy 0.613 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 35.277 Degrees of Freedom 6 P-Value 0.0000 Likelihood Ratio Chi-Square Value 39.601 Degrees of Freedom 6 P-Value 0.0000
RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 1138.00 1130.55 0.24 0.05 14.94 2 1532.00 1538.86 0.20 0.03 -13.70 3 502.00 503.06 0.05 0.00 -2.11 4 1354.00 1353.05 0.03 0.00 1.89 5 75.00 73.24 0.21 0.04 3.57 6 200.00 213.59 0.95 0.86 -26.29 7 198.00 169.07 2.26 4.95 62.55 8 852.00 869.58 0.64 0.36 -34.80 9 13.00 22.06 1.93 3.72 -13.75 10 43.00 31.55 2.04 4.15 26.62 11 9.00 11.65 0.78 0.60 -4.64 12 37.00 36.89 0.02 0.00 0.23 13 15.00 10.61 1.35 1.81 10.38 14 59.00 54.54 0.61 0.36 9.28 15 23.00 52.76 4.11 16.79 -38.20 16 309.00 287.94 1.27 1.54 43.62
Model III: augmented biform
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table5_1.dat ; Variable: Names are a b c d freq; Missing are all (-9999) ; categorical are a b c d; weight is freq (freq); classes = cl(7); Analysis: Type = mixture ; model: %overall% [a$1*-10] (q1); [b$1*10] (p2); [c$1*10] (p3); [d$1*-10] (q4); %cl#1% [a$1*-10] (q1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#2% [a$1*10] (p1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#3% [a$1*10] (p1); [b$1*10] (p2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#4% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*-10] (q4); %cl#5% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*10] (p4); %cl#6% [a$1*-10] (q1); [b$1*10] (p2); [c$1*-10] (q3); [d$1*-10] (q4); model constraint: p1 = -q1; p2 = -q2; p3 = -q3; p4 = -q4; output: tech10;
TESTS OF MODEL FIT Loglikelihood H0 Value -12916.633 Information Criteria Number of Free Parameters 10 Akaike (AIC) 25853.266 Bayesian (BIC) 25920.843 Sample-Size Adjusted BIC 25889.065 (n* = (n + 2) / 24) Entropy 0.665 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 20.806 Degrees of Freedom 5 P-Value 0.0009 Likelihood Ratio Chi-Square Value 18.534 Degrees of Freedom 5 P-Value 0.0023
RESPONSE PATTERN FREQUENCIES AND CHI-SQUARE CONTRIBUTIONS Response Frequency Standard Chi-square Contribution Pattern Observed Estimated Residual Pearson Loglikelihood Deleted 1 1138.00 1130.04 0.26 0.06 15.98 2 1532.00 1539.78 0.23 0.04 -15.52 3 502.00 500.24 0.08 0.01 3.52 4 1354.00 1354.60 0.02 0.00 -1.20 5 75.00 74.04 0.11 0.01 1.93 6 200.00 208.66 0.61 0.36 -16.96 7 198.00 198.53 0.04 0.00 -1.07 8 852.00 845.10 0.25 0.06 13.85 9 13.00 22.50 2.01 4.01 -14.27 10 43.00 32.36 1.87 3.50 24.44 11 9.00 10.78 0.54 0.29 -3.25 12 37.00 36.70 0.05 0.00 0.60 13 15.00 6.61 3.27 10.66 24.60 14 59.00 61.00 0.26 0.07 -3.93 15 23.00 30.25 1.32 1.74 -12.61 16 309.00 307.79 0.07 0.00 2.43
Table 5.2 on page 70 based on model III in the previous example. We will only display the relevant part of the output from the previous Mplus run.
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 1321.35246 0.20779 2 1702.89005 0.26779 3 1444.95636 0.22723 4 1077.81020 0.16949 5 400.30746 0.06295 6 260.16087 0.04091 7 151.52261 0.02383
RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.917 0.015 61.663 Category 2 0.083 0.015 5.577 B Category 1 0.837 0.013 63.040 Category 2 0.163 0.013 12.317 C Category 1 0.967 0.008 123.853 Category 2 0.033 0.008 4.229 D Category 1 0.981 0.002 444.472 Category 2 0.019 0.002 8.782
Table 5.3 on page 71 based on model III in the previous example. We use the SAVEDATA command of Mplus to save the posterior class probabilities along with the most likely class for each individual. The first five columns are manifest variables and their frequencies. The next seven columns are posterior probabilities for each class. Based on the posterior probabilities, the classification is determined. The modal posterior probabilities is the maximum of the seven probabilities.
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table5_1.dat ; Variable: Names are a b c d freq; Missing are all (-9999) ; categorical are a b c d; weight is freq (freq); classes = cl(7); Analysis: Type = mixture ; model: %overall% [a$1*-10] (q1); [b$1*10] (p2); [c$1*10] (p3); [d$1*-10] (q4); %cl#1% [a$1*-10] (q1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#2% [a$1*10] (p1); [b$1*-10] (q2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#3% [a$1*10] (p1); [b$1*10] (p2); [c$1*-10] (q3); [d$1*-10] (q4); %cl#4% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*-10] (q4); %cl#5% [a$1*10] (p1); [b$1*10] (p2); [c$1*10] (p3); [d$1*10] (p4); %cl#6% [a$1*-10] (q1); [b$1*10] (p2); [c$1*-10] (q3); [d$1*-10] (q4); model constraint: p1 = -q1; p2 = -q2; p3 = -q3; p4 = -q4; output: tech10; savedata: file is table5_3.dat; save = cprob;
0.000 0.000 0.000 0.000 1138.000 0.851 0.099 0.016 0.000 0.000 0.033 0.001 1.000 1.000 0.000 0.000 0.000 1532.000 0.056 0.805 0.133 0.003 0.000 0.002 0.000 2.000 0.000 1.000 0.000 0.000 502.000 0.375 0.044 0.190 0.005 0.000 0.378 0.008 6.000 1.000 1.000 0.000 0.000 1354.000 0.013 0.179 0.776 0.020 0.000 0.013 0.000 3.000 0.000 0.000 1.000 0.000 75.000 0.443 0.052 0.009 0.187 0.001 0.017 0.291 1.000 1.000 0.000 1.000 0.000 200.000 0.014 0.203 0.034 0.734 0.005 0.001 0.009 4.000 0.000 1.000 1.000 0.000 198.000 0.032 0.004 0.016 0.357 0.003 0.033 0.555 7.000 1.000 1.000 1.000 0.000 852.000 0.001 0.010 0.042 0.928 0.007 0.001 0.012 4.000 0.000 0.000 0.000 1.000 13.000 0.844 0.098 0.016 0.000 0.008 0.032 0.001 1.000 1.000 0.000 0.000 1.000 43.000 0.053 0.756 0.125 0.003 0.060 0.002 0.000 2.000 0.000 1.000 0.000 1.000 9.000 0.344 0.040 0.174 0.004 0.083 0.347 0.007 6.000 1.000 1.000 0.000 1.000 37.000 0.009 0.130 0.566 0.014 0.271 0.009 0.000 3.000 0.000 0.000 1.000 1.000 15.000 0.098 0.011 0.002 0.041 0.779 0.004 0.064 5.000 1.000 0.000 1.000 1.000 59.000 0.001 0.014 0.002 0.050 0.933 0.000 0.001 5.000 0.000 1.000 1.000 1.000 23.000 0.004 0.000 0.002 0.046 0.871 0.004 0.072 5.000 1.000 1.000 1.000 1.000 309.000 0.000 0.001 0.002 0.050 0.946 0.000 0.001 5.000
Table 6. 2 on page 76 using https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_1_g-1.dat, https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_1_f-1.dat and https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_1_m-1.dat.
Model I: Combined group analysis
Data: File is c:daytontable6_1_g.dat ; Variable: Names are a b c d g freq; Missing are all (-9999) ; usevariables are a b c d g freq; weight is freq (freq); categorical are a b c d g; classes =x(2); Analysis: Type = mixture ; model: %overall% [a$1*-10 b$1*-10 c$1*-10 d$1*-10]; [g$1] (1); %x#1% [g$1] (1);
TESTS OF MODEL FIT Loglikelihood H0 Value -653.101 Information Criteria Number of Free Parameters 10 Akaike (AIC) 1326.202 Bayesian (BIC) 1363.791 Sample-Size Adjusted BIC 1332.074 (n* = (n + 2) / 24) Entropy 0.736 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 24.868 Degrees of Freedom 21 P-Value 0.2529 Likelihood Ratio Chi-Square Value 28.887 Degrees of Freedom 21 P-Value 0.1167 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 264.93321 0.83575 2 52.06679 0.16425 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.984 0.029 34.408 Category 2 0.016 0.029 0.574 B Category 1 0.976 0.031 31.767 Category 2 0.024 0.031 0.784 C Category 1 0.963 0.016 61.892 Category 2 0.037 0.016 2.385 D Category 1 0.817 0.027 30.566 Category 2 0.183 0.027 6.829 G Category 1 0.432 0.028 15.533 Category 2 0.568 0.028 20.408 Latent Class 2 A Category 1 0.431 0.172 2.507 Category 2 0.569 0.172 3.316 B Category 1 0.412 0.169 2.443 Category 2 0.588 0.169 3.487 C Category 1 0.785 0.089 8.793 Category 2 0.215 0.089 2.402 D Category 1 0.623 0.108 5.761 Category 2 0.377 0.108 3.482 G Category 1 0.432 0.028 15.533 Category 2 0.568 0.028 20.408
Model II: Analysis on female group
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_1_f-1.dat ; Variable: Names are a b c d freq; Missing are all (-9999) ; usevariables are a b c d freq; weight is freq (freq); categorical are a b c d ; classes =x(2); Analysis: Type = mixture ; model: %overall% [a$1*-10 b$1*-10 c$1*-10 d$1*-10];
TESTS OF MODEL FIT Loglikelihood H0 Value -273.207 Information Criteria Number of Free Parameters 9 Akaike (AIC) 564.415 Bayesian (BIC) 593.151 Sample-Size Adjusted BIC 564.648 (n* = (n + 2) / 24) Entropy 0.761 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 7.300 Degrees of Freedom 6 P-Value 0.2940 Likelihood Ratio Chi-Square Value 8.660 Degrees of Freedom 6 P-Value 0.1936
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 26.27241 0.14596 2 153.72759 0.85404
RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.356 0.301 1.183 Category 2 0.644 0.301 2.144 B Category 1 0.307 0.259 1.185 Category 2 0.693 0.259 2.671 C Category 1 0.812 0.120 6.766 Category 2 0.188 0.120 1.564 D Category 1 0.625 0.147 4.241 Category 2 0.375 0.147 2.544 Latent Class 2 A Category 1 0.980 0.043 22.900 Category 2 0.020 0.043 0.467 B Category 1 0.936 0.053 17.775 Category 2 0.064 0.053 1.210 C Category 1 0.941 0.021 44.072 Category 2 0.059 0.021 2.762 D Category 1 0.791 0.035 22.358 Category 2 0.209 0.035 5.912
Model III: Analysis on male group
Data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_1_m-1.dat ; Variable: Names are a b c d freq; Missing are all (-9999) ; usevariables are a b c d freq; weight is freq (freq); categorical are a b c d ; classes =x(2); Analysis: Type = mixture ; model: %overall% [a$1*-10 b$1*-10 c$1*-10 d$1*-10];
TESTS OF MODEL FIT Loglikelihood H0 Value -156.177 Information Criteria Number of Free Parameters 9 Akaike (AIC) 330.354 Bayesian (BIC) 356.634 Sample-Size Adjusted BIC 328.162 (n* = (n + 2) / 24) Entropy 0.797 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 5.526 Degrees of Freedom 6 P-Value 0.4784 Likelihood Ratio Chi-Square Value 6.398 Degrees of Freedom 6 P-Value 0.3801
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 117.08534 0.85464 2 19.91466 0.14536
RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 0.977 0.027 36.663 Category 2 0.023 0.027 0.846 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 0.994 0.022 45.732 Category 2 0.006 0.022 0.259 D Category 1 0.855 0.039 21.915 Category 2 0.145 0.039 3.710 Latent Class 2 A Category 1 0.430 0.206 2.087 Category 2 0.570 0.206 2.771 B Category 1 0.548 0.197 2.776 Category 2 0.452 0.197 2.289 C Category 1 0.682 0.129 5.293 Category 2 0.318 0.129 2.472 D Category 1 0.546 0.148 3.686 Category 2 0.454 0.148 3.069
Table 6.4 on page 80 using spatial data, https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_3-1.dat, https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_3_f-1.dat and https://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_3_m-1.dat.
Model I: analysis on male group
data: File is c:daytonhttps://stats.idre.ucla.edu/wp-content/uploads/2016/02/table6_3_m-1.dat ; Variable: Names are a b c freq; Missing are all (-9999) ; usevariables are a b c freq; weight is freq (freq); categorical are a b c ; classes =x(4); Analysis: Type = mixture ; model: %overall% [a$1*-10] (2); [b$1*-10] (2); [c$1*-10] (2); %x#1% [a$1*10] (1); [b$1*10] (1); [c$1*10] (1); %x#2% [a$1*10] (2); [b$1*-10] (1); [c$1*-10] (1); %x#3% [a$1*10] (2); [b$1*10] (2); [c$1*-10] (1);
TESTS OF MODEL FIT Loglikelihood H0 Value -360.823 Information Criteria Number of Free Parameters 5 Akaike (AIC) 731.647 Bayesian (BIC) 749.564 Sample-Size Adjusted BIC 733.712 (n* = (n + 2) / 24) Entropy 0.935 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 2.837 Degrees of Freedom 2 P-Value 0.2420 Likelihood Ratio Chi-Square Value 4.436 Degrees of Freedom 2 P-Value 0.1089 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 80.66675 0.30326 2 42.00001 0.15789 3 112.42420 0.42265 4 30.90904 0.11620
RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 2 A Category 1 0.029 0.013 2.258 Category 2 0.971 0.013 74.503 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 3 A Category 1 0.029 0.013 2.258 Category 2 0.971 0.013 74.503 B Category 1 0.029 0.013 2.258 Category 2 0.971 0.013 74.503 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 4 A Category 1 0.029 0.013 2.258 Category 2 0.971 0.013 74.503 B Category 1 0.029 0.013 2.258 Category 2 0.971 0.013 74.503 C Category 1 0.029 0.013 2.258 Category 2 0.971 0.013 74.503
Model II: analysis on female group
data: File is c:daytontable6_3_f.dat ; Variable: Names are a b c freq; Missing are all (-9999) ; usevariables are a b c freq; weight is freq (freq); categorical are a b c ; classes =x(4); Analysis: Type = mixture ; model: %overall% [a$1*-10] (2); [b$1*-10] (2); [c$1*-10] (2); %x#1% [a$1*10] (1); [b$1*10] (1); [c$1*10] (1); %x#2% [a$1*10] (2); [b$1*-10] (1); [c$1*-10] (1); %x#3% [a$1*10] (2); [b$1*10] (2); [c$1*-10] (1);
TESTS OF MODEL FIT Loglikelihood H0 Value -378.816 Information Criteria Number of Free Parameters 5 Akaike (AIC) 767.631 Bayesian (BIC) 786.266 Sample-Size Adjusted BIC 770.408 (n* = (n + 2) / 24) Entropy 0.977 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 1.667 Degrees of Freedom 2 P-Value 0.4345 Likelihood Ratio Chi-Square Value 1.595 Degrees of Freedom 2 P-Value 0.4504 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 87.74567 0.28582 2 27.93863 0.09101 3 150.96490 0.49174 4 40.35080 0.13144
RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 2 A Category 1 0.009 0.006 1.424 Category 2 0.991 0.006 162.391 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 3 A Category 1 0.009 0.006 1.424 Category 2 0.991 0.006 162.391 B Category 1 0.009 0.006 1.424 Category 2 0.991 0.006 162.391 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 Latent Class 4 A Category 1 0.009 0.006 1.424 Category 2 0.991 0.006 162.391 B Category 1 0.009 0.006 1.424 Category 2 0.991 0.006 162.391 C Category 1 0.009 0.006 1.424 Category 2 0.991 0.006 162.391
Model III: Combined analysis. The results here are a little off here, especially the p-value.
data: File is c:daytontable6_3.dat ; Variable: Names are a b c g freq; Missing are all (-9999) ; usevariables are a b c g freq; weight is freq (freq); categorical are a b c g; classes =x(4); Analysis: Type = mixture ; model: %overall% [a$1*-10] (2); [b$1*-10] (2); [c$1*-10] (2); [g$1@0]; %x#1% [a$1*10] (1); [b$1*10] (1); [c$1*10] (1); %x#2% [a$1*10] (2); [b$1*-10] (1); [c$1*-10] (1); %x#3% [a$1*10] (2); [b$1*10] (2); [c$1*-10] (1); THE MODEL ESTIMATION TERMINATED NORMALLY TESTS OF MODEL FIT Loglikelihood H0 Value -1142.027 Information Criteria Number of Free Parameters 5 Akaike (AIC) 2294.054 Bayesian (BIC) 2315.808 Sample-Size Adjusted BIC 2299.936 (n* = (n + 2) / 24) Entropy 0.959 Chi-Square Test of Model Fit for the Binary and Ordered Categorical (Ordinal) Outcomes Pearson Chi-Square Value 18.179 Degrees of Freedom 10 P-Value 0.0520 Likelihood Ratio Chi-Square Value 19.396 Degrees of Freedom 10 P-Value 0.0355 FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent Classes 1 168.69989 0.29442 2 69.66925 0.12159 3 263.38416 0.45966 4 71.24670 0.12434 RESULTS IN PROBABILITY SCALE Latent Class 1 A Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 G Category 1 0.500 0.000 0.000 Category 2 0.500 0.000 0.000 Latent Class 2 A Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 B Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 G Category 1 0.500 0.000 0.000 Category 2 0.500 0.000 0.000 Latent Class 3 A Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 B Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 C Category 1 1.000 0.000 0.000 Category 2 0.000 0.000 0.000 G Category 1 0.500 0.000 0.000 Category 2 0.500 0.000 0.000 Latent Class 4 A Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 B Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 C Category 1 0.017 0.007 2.668 Category 2 0.983 0.007 149.771 G Category 1 0.500 0.000 0.000 Category 2 0.500 0.000 0.000