Simulate Cognitive Diagnostic Model ('CDM') Data

Provides efficient R and 'C++' routines to simulate cognitive diagnostic model data for Deterministic Input, Noisy "And" Gate ('DINA') and reduced Reparameterized Unified Model ('rRUM') from Culpepper and Hudson (2017) , Culpepper (2015) , and de la Torre (2009) .

BuildStatus Package-License CRAN VersionBadge CRANStatus RStudio CRAN Mirror’s MonthlyDownloads RStudio CRAN Mirror’s TotalDownloads Coveragestatus

The goal of simcdm is to provide flexible ways to simulate data under cognitive diagnostic models.


You can install simcdm from GitHub with:

# install.packages("devtools")


To use simcdm, load the package using:



There are four distinct sets of functions within the package:

  • Attributes: attribute_classes(), attribute_bijection(), attribute_inv_bijection(), and sim_subject_attributes().
  • Matrix: sim_q_matrix() and sim_eta_matrix()
  • Deterministic Input, Noisy And Gate (DINA): sim_dina_items() and sim_dina_attributes()
  • reduced Reparameterized Unified Model (rRUM): sim_rrum_items()

Functions that use random numbers to simulate values are named with the prefix of sim_*(). This is done to allow for functions to be quickly identified and used through autocomplete inside of the RStudio IDE. At a later time, the attribute_*() will likely be moved to a different package.

For more details, please see the package vignettes:


James Joseph Balamuta and Steven Andrew Culpepper with contributions from Aaron Hudson.

Citing the simcdm package

To ensure future development of the package, please cite simcdm package if used during the analysis or simulations. Citation information for the package may be acquired by using in R:



GPL (>= 2)


simcdm 0.1.1


  • Addressed a signed vs. unsigned integer comparison.


  • Fixed spacing issues brought on from an organization of C++ code.


  • Changed unit tests to use R 3.5.0's RNG setup in anticipation for the RNG change in R 3.6.0.

simcdm 0.1.0


  • Renamed sim_attribute_classes() to attribute_classes().
  • Addressed ambiguous calls to std::pow(<int>, <int>)


  • Added a CITATION file for the package
  • Improved Vignette Examples
  • Improved README contents


  • Added Unit Tests to verify simulation routines and attribute generations.
  • Added testing on Travis-CI for the previous release of R, e.g. the oldrel.

simcdm 0.0.5


  • Added C++ and R functions for simulation of:
    • Deterministic Input, Noisy "And" Gate (DINA)
      • Item Response: sim_dina_items()
      • $\eta$ Response: sim_dina_attributes().
    • reduced Reparameterized Unified Model (rRUM):
      • Item Reponse: sim_rrum_items()
    • Matrices:
      • Random Q Matrix: sim_q_matrix()
      • ETA Matrix: sim_eta_matrix()
      • Latent Attribute Profiles for Subjects: sim_subject_attributes()
    • Attributes:
      • Latent Attribute Profile Matrix: sim_attribute_classes()
      • Attribute Bijection: attribute_bijection()
      • Attribute Inverse Bijection: attribute_inv_bijection()

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.1 by James Joseph Balamuta, 2 years ago

Report a bug at

Browse source code at

Authors: James Joseph Balamuta [aut, cre, cph] , Steven Andrew Culpepper [aut, cph] , Aaron Hudson [ctb, cph]

Documentation:   PDF Manual  

Task views: Psychometric Models and Methods

GPL (>= 2) license

Imports Rcpp

Suggests testthat, covr, knitr, rmarkdown

Linking to Rcpp, RcppArmadillo

Depended on by dina, rrum.

Suggested by edina, errum.

See at CRAN