Cognitive diagnosis and Q-matrix governance

knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
library(eyeprocess)

The cognitive-diagnosis layer supplies transparent Q-matrix audits, attribute-profile enumeration, and deterministic DINA ideal-response/probability calculations.

Q <- rbind(c(1,0), c(0,1), c(1,1), c(1,0))
aud <- eyeprocess_cdm_qmatrix_audit(Q)
aud
profiles <- eyeprocess_cdm_attribute_profiles(2)[, c("A1","A2")]
eta <- eyeprocess_cdm_dina_ideal_response(Q, profiles)
eyeprocess_cdm_dina_probability(eta)

These utilities do not replace full cognitive-diagnosis estimation, Q-matrix validation, or model comparison. fit_eyeprocess_gdina() delegates exact fitting to GDINA and gates cleanly when unavailable.

Primary package source: https://cran.r-project.org/package=GDINA.

Visual audit

A compact deterministic Q-matrix makes the structural audit visible. The display concerns declared item-attribute structure and does not by itself establish substantive validity.

viz_Q <- rbind(
  c(1, 0),
  c(0, 1),
  c(1, 1),
  c(1, 0),
  c(0, 1),
  c(1, 1)
)

rownames(viz_Q) <- paste0('Item ', seq_len(nrow(viz_Q)))
colnames(viz_Q) <- c('Attribute 1', 'Attribute 2')

viz_qmatrix <- eyeprocess::eyeprocess_cdm_qmatrix_audit(viz_Q)

stopifnot(
  inherits(viz_qmatrix, 'eye_cdm_qmatrix_audit')
)

plot(viz_qmatrix)


Try the eyeprocess package in your browser

Any scripts or data that you put into this service are public.

eyeprocess documentation built on Sept. 28, 2026, 5:08 p.m.