Learn R Programming

CDM

Cognitive Diagnosis Modeling

If you use CDM and have suggestions for improvement or have found bugs, please email me at robitzsch@leibniz-ipn.de. Please always provide a minimal dataset, necessary to demonstrate the problem, a minimal runnable code necessary to reproduce the issue, which can be run on the given dataset, and all necessary information on the used librarys, the R version, and the OS it is run on, perhaps a sessionInfo().

Manual

The manual can be found here https://alexanderrobitzsch.github.io/CDM/

CRAN version

The official version of CDM is hosted on CRAN and can be found here. The CRAN version can be installed from within R using:

utils::install.packages("CDM")

GitHub version

The version hosted here is the development version of CDM. The GitHub version can be installed using devtools as:

devtools::install_github("alexanderrobitzsch/CDM")

Copy Link

Version

Install

install.packages('CDM')

Monthly Downloads

3,247

Version

8.3-14

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Alexander Robitzsch

Last Published

July 13th, 2025

Functions in CDM (8.3-14)

IRT.likelihood

S3 Methods for Extracting of the Individual Likelihood and the Individual Posterior
IRT.jackknife

Jackknifing an Item Response Model
IRT.marginal_posterior

S3 Method for Computation of Marginal Posterior Distribution
IRT.irfprob

S3 Methods for Extracting Item Response Functions
IRT.parameterTable

S3 Method for Extracting a Parameter Table
IRT.itemfit

S3 Methods for Computing Item Fit
IRT.modelfit

S3 Methods for Assessing Model Fit
cdi.kli

Cognitive Diagnostic Indices based on Kullback-Leibler Information
WaldTest

Wald Test for a Linear Hypothesis
cdm.est.class.accuracy

Classification Reliability in a CDM
IRT.repDesign

Generation of a Replicate Design for IRT.jackknife
data.dcm

Dataset from Book 'Diagnostic Measurement' of Rupp, Templin and Henson (2010)
coef

Extract Estimated Item Parameters and Skill Class Distribution Parameters
data.dtmr

DTMR Fraction Data (Bradshaw et al., 2014)
data.Students

Dataset Student Questionnaire
data.cdm

Several Datasets for the CDM Package
anova

Likelihood Ratio Test for Model Comparisons
data.ecpe

Dataset ECPE
data.melab

MELAB Data (Li, 2011)
data.pgdina

Dataset for Polytomous GDINA Model
data.sda6

Dataset SDA6 (Jurich & Bradshaw, 2014)
data.mg

Large-Scale Dataset with Multiple Groups
data.hr

Dataset data.hr (Ravand et al., 2013)
data.fraction

Fraction Subtraction Dataset with Different Subsets of Data and Different Q-Matrices
data.timss03.G8.su

TIMSS 2003 Mathematics 8th Grade (Su et al., 2013)
data.pisa00R

PISA 2000 Reading Study (Chen & de la Torre, 2014)
data.jang

Dataset Jang (2009)
din.deterministic

Deterministic Classification and Joint Maximum Likelihood Estimation of the Mixed DINA/DINO Model
din_identifiability

Identifiability Conditions of the DINA Model
din

Parameter Estimation for Mixed DINA/DINO Model
data.timss07.G4.lee

TIMSS 2007 Mathematics 4th Grade (Lee et al., 2011)
entropy.lca

Test-specific and Item-specific Entropy for Latent Class Models
din.equivalent.class

Calculation of Equivalent Skill Classes in the DINA/DINO Model
discrim.index

Discrimination Indices at Item-Attribute, Item and Test Level
deltaMethod

Variance Matrix of a Nonlinear Estimator Using the Delta Method
data.timss11.G4.AUT

TIMSS 2011 Mathematics 4th Grade Austrian Students
din.validate.qmatrix

Q-Matrix Validation (Q-Matrix Modification) for Mixed DINA/DINO Model
equivalent.dina

Determination of a Statistically Equivalent DINA Model
ideal.response.pattern

Ideal Response Pattern
fraction.subtraction.data

Fraction Subtraction Data
fraction.subtraction.qmatrix

Fraction Subtraction Q-Matrix
gdd

Generalized Distance Discriminating Method
gdina.dif

Differential Item Functioning in the GDINA Model
gdm

General Diagnostic Model
eval_likelihood

Evaluation of Likelihood
gdina

Estimating the Generalized DINA (GDINA) Model
gdina.wald

Wald Statistic for Item Fit of the DINA and ACDM Rule for GDINA Model
item_by_group

Create Dataset with Group-Specific Items
mcdina

Multiple Choice DINA Model
itemfit.rmsea

RMSEA Item Fit
osink

Opens and Closes a sink Connection
numerical_Hessian

Numerical Computation of the Hessian Matrix
personfit.appropriateness

Appropriateness Statistic for Person Fit Assessment
modelfit.cor

Assessing Model Fit and Local Dependence by Comparing Observed and Expected Item Pair Correlations
plot.din

Plot Method for Objects of Class din
logLik

Extract Log-Likelihood
itemfit.sx2

S-X2 Item Fit Statistic for Dichotomous Data
skill.cor

Tetrachoric or Polychoric Correlations between Attributes
print.summary.din

Print Method for Objects of Class summary.din
skillspace.approximation

Skill Space Approximation
plot_item_mastery

S3 Methods for Plotting Item Probabilities
sim_model

Simulate an Item Response Model
sim.gdina

Simulation of the GDINA model
reglca

Regularized Latent Class Analysis
summary.din

Summary Method for Objects of Class din
vcov

Asymptotic Covariance Matrix, Standard Errors and Confidence Intervals
skillspace.hierarchy

Creation of a Hierarchical Skill Space
sim.din

Data Simulation Tool for DINA, DINO and mixed DINA and DINO Data
summary_sink

Prints summary and sink Output in a File
predict

Expected Values and Predicted Probabilities from Item Response Response Models
sequential.items

Constructing a Dataset with Sequential Pseudo Items for Ordered Item Responses
slca

Structured Latent Class Analysis (SLCA)
Data-sim

Artificial Data: DINA and DINO
IRT.anova

Helper Function for Conducting Likelihood Ratio Tests
CDM-utilities

Utility Functions in CDM
IRT.expectedCounts

S3 Method for Extracting Expected Counts
IRT.data

S3 Method for Extracting Used Item Response Dataset
IRT.classify

Individual Classification for Fitted Models
IRT.IC

Information Criteria
IRT.compareModels

Comparisons of Several Models
IRT.RMSD

Root Mean Square Deviation (RMSD) Item Fit Statistic
CDM-package

tools:::Rd_package_title("CDM")
IRT.frequencies

S3 Method for Computing Observed and Expected Frequencies of Univariate and Bivariate Marginals
IRT.factor.scores

S3 Methods for Extracting Factor Scores (Person Classifications)
IRT.irfprobPlot

Plot Item Response Functions