Expands a wide-form matrix of item responses to a long-form data frame of sub-item responses
An integer matrix of IRT responses (columns represent items, rows represent respondents)
A mapping matrix with as many rows as there are response options for the items.
A data frame with one row per sub-item response
De Boeck, P. and Partchev, I. (2012). IRTrees: Tree-Based Item Response Models of the GLMM Family, Journal of Statistical Software – Code Snippets, 48(1), 1–28. http://www.jstatsoft.org/v48/c01/.