Cognitive Diagnosis Modeling Using the GDINA R Package

  • Wenchao MaEmail author
Part of the Methodology of Educational Measurement and Assessment book series (MEMA)


The GDINA R package (Ma and de la Torre, GDINA: The generalized DINA model framework. R package version 2.3.2. Retrieved from 2019) provides psychometric tools for estimating a range of cognitive diagnosis models (CDMs) and conducting various CDM analyses. The package is developed in the R programming environment (R Core Team, R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna. 2018). This chapter describes the main features of the package and presents an exemplary analysis of data to illustrate the use of the package.


Cognitive diagnosis CDM G-DINA model GDINA R package 


  1. Bock, R. D., & Aitkin, M. (1981). Marginal maximum likelihood estimation of item parameters: Application of an EM algorithm. Psychometrika, 46, 443–459.CrossRefGoogle Scholar
  2. Chang, W., Cheng, J., Allaire, J., Xie, Y., & McPherson, J. (2017). Shiny: Web application framework for R. R package version 1.0.5, Retrieved from
  3. Chen, J., & de la Torre, J. (2013). A general cognitive diagnosis model for expert-defined polytomous attributes. Applied Psychological Measurement, 37, 419–437.CrossRefGoogle Scholar
  4. Chen, J., de la Torre, J., & Zhang, Z. (2013). Relative and absolute fit evaluation in cognitive diagnosis modeling. Journal of Educational Measurement, 50, 123–140.CrossRefGoogle Scholar
  5. R Core Team. (2018). R: A language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing. Google Scholar
  6. de Ayala, R. J. (2013). The theory and practice of item response theory. New York: Guilford Publications.Google Scholar
  7. de la Torre, J. (2011). The generalized DINA model framework. Psychometrika, 76, 179–199.CrossRefGoogle Scholar
  8. de la Torre, J., & Chiu, C.-Y. (2016). A general method of empirical Q-matrix validation. Psychometrika, 81, 253–273.CrossRefGoogle Scholar
  9. de la Torre, J., & Douglas, J. A. (2004). Higher-order latent trait models for cognitive diagnosis. Psychometrika, 69, 333–353.CrossRefGoogle Scholar
  10. de la Torre, J., & Douglas, J. A. (2008). Model evaluation and multiple strategies in cognitive diagnosis: An analysis of fraction subtraction data. Psychometrika, 73, 595–624.CrossRefGoogle Scholar
  11. de la Torre, J., & Lee, Y.-S. (2013). Evaluating the Wald test for item-level comparison of saturated and reduced models in cognitive diagnosis. Journal of Educational Measurement, 50, 355–373.CrossRefGoogle Scholar
  12. de la Torre, J., & Ma, W. (2016, August). Cognitive diagnosis modeling: A general framework approach and its implementation in R. New York: A Short Course at the Fourth Conference on Statistical Methods in Psychometrics, Columbia University.Google Scholar
  13. Doornik, J. A. (2009). Object-oriented matrix programming using Ox (Version 6) [Computer software]. London: Timberlake Consultants Press.Google Scholar
  14. Eddelbuettel, D., & Francois, R. (2011). Rcpp: Seamless R and C++ integration. Journal of Statistical Software, 40, 1–18.Google Scholar
  15. Eddelbuettel, D., & Sanderson, C. (2014). RcppArmadillo: Accelerating R with high-performance C++ linear algebra. Computational Statistics and Data Analysis, 71, 1054–1063.CrossRefGoogle Scholar
  16. Haertel, E. H. (1989). Using restricted latent class models to map the skill structure of achievement items. Journal of Educational Measurement, 26, 301–321.CrossRefGoogle Scholar
  17. Hartz, S. M. (2002). A Bayesian framework for the Unified Model for assessing cognitive abilities: Blending theory with practicality. (Unpublished doctoral dissertation). University of Illinois, Urbana-Champaign.Google Scholar
  18. Henson, R. A., Templin, J. L., & Willse, J. T. (2009). Defining a family of cognitive diagnosis models using log-linear models with latent variables. Psychometrika, 74, 191–210.CrossRefGoogle Scholar
  19. Hou, L., de la Torre, J., & Nandakumar, R. (2014). Differential item functioning assessment in cognitive diagnostic modeling: Application of the Wald test to investigate DIF in the DINA model. Journal of Educational Measurement, 51, 98–125.CrossRefGoogle Scholar
  20. Huebner, A., & Wang, C. (2011). A note on comparing examinee classification methods for cognitive diagnosis models. Educational and Psychological Measurement, 71, 407–419.CrossRefGoogle Scholar
  21. Kuo, B. C., Chen, C. H., Yang, C. W., & Mok, M. M. C. (2016). Cognitive diagnostic models for tests with multiple-choice and constructed-response items. Educational Psychology, 36, 1115–1133.CrossRefGoogle Scholar
  22. Leighton, J. P., Gierl, M. J., & Hunka, S. M. (2004). The Attribute hierarchy method for cognitive assessment: A variation on Tatsuoka’s rule-space approach. Journal of Educational Measurement, 41, 205–237.CrossRefGoogle Scholar
  23. Liu, Y., Douglas, J. A., & Henson, R. A. (2009). Testing person fit in cognitive diagnosis. Applied Psychological Measurement, 33, 579–598.CrossRefGoogle Scholar
  24. Liu, Y., Tian, W., & Xin, T. (2016). An application of M2 statistic to evaluate the fit of cognitive diagnostic models. Journal of Educational and Behavioral Statistics, 41, 3–26.CrossRefGoogle Scholar
  25. Ma, W. (2019). A diagnostic tree model for polytomous responses with multiple strategies. British Journal of Mathematical and Statistical Psychology, 72, 61–82.Google Scholar
  26. Ma, W., & de la Torre, J. (2019). An empirical Q-matrix validation method for the sequential G-DINA model. Advanced online publication.
  27. Ma, W., & de la Torre, J. (2019). GDINA: The generalized DINA model framework. R package version, 2.3.2. Retrieved from Google Scholar
  28. Ma, W., Iaconangelo, C., & de la Torre, J. (2016). Model similarity, model selection and attribute classification. Applied Psychological Measurement, 40, 200–217.Google Scholar
  29. Ma, W., Terzi, R., Lee, S., & de la Torre, J. (2017, April). Multiple group cognitive diagnosis models and their applications in detecting differential item functioning. Paper presented at the annual meeting of the American Educational Research Association, San Antonio, TX.Google Scholar
  30. Ma, W., & de la Torre, J. (2016). A sequential cognitive diagnosis model for polytomous responses. British Journal of Mathematical and Statistical Psychology, 69, 253–275.Google Scholar
  31. Maris, E. (1999). Estimating multiple classification latent class models. Psychometrika, 64, 187–212.CrossRefGoogle Scholar
  32. Maydeu-Olivares, A. (2013). Goodness-of-fit assessment of item response theory models. Measurement, 11, 71–101.Google Scholar
  33. Maydeu-Olivares, A., & Cai, L. (2006). A cautionary note on using G2 (dif) to assess relative model fit in categorical data analysis. Multivariate Behavioral Research, 41, 55–64.CrossRefGoogle Scholar
  34. Philipp, M., Strobl, C., de la Torre, J., & Zeileis, A. (2018). On the estimation of standard errors in cognitive diagnosis models. Journal of Educational and Behavioral Statistics, 43, 88–115.CrossRefGoogle Scholar
  35. Sorrel, M. A., Abad, F. J., Olea, J., de la Torre, J., & Barrada, J. R. (2017a). Inferential item-fit evaluation in cognitive diagnosis modeling. Applied Psychological Measurement, 41, 614–631.CrossRefGoogle Scholar
  36. Sorrel, M. A., de la Torre, J., Abad, F. J., & Olea, J. (2017b). Two-step likelihood ratio test for item-level model comparison in cognitive diagnosis models. Methodology, 13, 39–47.CrossRefGoogle Scholar
  37. Templin, J. L., & Bradshaw, L. (2014). Hierarchical diagnostic classification models: A family of models for estimating and testing attribute hierarchies. Psychometrika, 79, 317–339.CrossRefGoogle Scholar
  38. Templin, J. L., & Henson, R. A. (2006). Measurement of psychological disorders using cognitive diagnosis models. Psychological Methods, 11, 287–305.CrossRefGoogle Scholar
  39. Templin, J. L., & Hoffman, L. (2013). Obtaining diagnostic classification model estimates using Mplus. Educational Measurement: Issues and Practice, 32, 37–50.CrossRefGoogle Scholar
  40. von Davier, M. (2008). A general diagnostic model applied to language testing data. British Journal of Mathematical and Statistical Psychology, 61, 287–307.CrossRefGoogle Scholar
  41. von Davier, M. (2014). The log-linear cognitive diagnostic model (LCDM) as a special case of the general diagnostic model (GDM). ETS Research Report Series, 2014, 1–13.CrossRefGoogle Scholar
  42. Xu, X., & von Davier, M. (2008). Fitting the structured general diagnostic model to NAEP data. ETS Research Report Series, 2008, 1–18.Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.The University of AlabamaTuscaloosaUSA

Personalised recommendations