tdcm()
is used to estimate the transition diagnostic classification model (TDCM; Madison &
Bradshaw, 2018a), which is a longitudinal extension of the log-linear cognitive diagnosis model
(LCDM; Henson, Templin, & Willse, 2009). It allows for the specification of many specific DCMs
via the rule
option. For the multigroup TDCM, see mg.tdcm()
.
Arguments
- data
A required \(N \times T \times I\) data matrix containing binary item responses. For each time point, the binary item responses are in the columns.
- q.matrix
A required \(I \times A\) matrix indicating which items measure which attributes. If there are multiple Q-matrices, then they must have the same number of attributes and must be stacked on top of each other for estimation (to specify multiple Q-matrices, see
num.q.matrix
,num.items
, andanchor
).- num.time.points
A required integer \(\ge 2\) specifying the number of time points (i.e., measurement / testing occasions).
- invariance
logical. If
TRUE
(the default), the item parameter invariance will be constrained to be equal at each time point. IfFALSE
, item parameters are not assumed to be equal over time.- rule
A string or a vector of the specific DCM to be employed. Currently accepts the same values as
rule
inCDM::gdina()
. The default is"GDINA"
, which is implemented with a logit link to estimate the LCDM. Ifrule
is supplied as a single string, then that DCM will be assumed for each item. If entered as a vector, a DCM can be specified for each item.- num.q.matrix
An optional integer specifying the number of Q-matrices. For many applications, the same assessment is administered at each time point and this number is 1 (the default). If there are different Q-matrices for each time point, then this argument must be specified and should be equal to the number of time points. For example, if there are three time points, and the Q-matrix for each time point is different, then
num.q.matrix = 3
. If there are three time points, and the Q-matrix is different only for time point 3, thennum.q.matrix
is still specified as3
.- num.items
An optional integer specifying the number of Q-matrices (the default is
1
). when there are multiple Q-matrices, the number of items in each Q-matrix is specified as a vector of lengthT
. For example, if there are three time points, and the Q-matrices for each time point have 8, 10, and 12 items, respectively, thennum.items = c(8, 10, 12)
. Default is an empty vector to indicate there is only one Q-matrix.- anchor
When there are different tests at each time point, this optional anchor argument is a vector of pairs of item numbers indicating which items are the same across time points and should be held invariant. For example, if there are three Q-matrices with 10 items each, and Items 1, 11, and 21 are the same, and Items 14 and 24 are the same, then
anchor = c(1,11,1,21,14,24)
. Default is an empty vector to indicate there is only one Q-matrix.- progress
logical. If
FALSE
An optional logical indicating whether the function should print the progress of estimation.
Value
An object of class gdina
with entries as described in CDM::gdina()
. To see a
TDCM-specific summary of the object (e.g., growth, transitions), use tdcm.summary()
.
Details
Estimation of the TDCM via the CDM package (George, et al., 2016), which is based on an EM algorithm as described in de la Torre (2011). The estimation approach is further detailed in Madison et al. (2023).
References
de la Torre, J. (2011). The generalized DINA model framework. Psychometrika, 76, 179-199.
George, A. C., Robitzsch, A., Kiefer, T., Gross, J., & Ünlü , A. (2016). The R package CDM for cognitive diagnosis models. Journal of Statistical Software, 74(2), 1-24.
Henson, R., Templin, J., & Willse, J. (2009). Defining a family of cognitive diagnosis models using log linear models with latent variables. Psychometrika, 74, 191-21.
Madison, M. J., & Bradshaw, L. (2018a). Assessing growth in a diagnostic classification model framework. Psychometrika, 82(4), 963-990.
Madison, M. J., & Bradshaw, L. (2018b). Evaluating intervention effects in a diagnostic classification model framework. Journal of Educational Measurement, 55(1), 32-51.
Madison, M.J., Chung, S., Kim, J., & Bradshaw, L. (2024). Approaches to estimating longitudinal diagnostic classification models. Behaviormetrika, 51, 7-19. https://doi.org/10.1007/s41237-023-00202-5
Rupp, A. A., Templin, J., & Henson, R. (2010). Diagnostic Measurement: Theory, Methods, and Applications. New York: Guilford.
Examples
# \donttest{
## Example 1: T = 2, A = 4
data(data.tdcm01, package = "TDCM")
data <- data.tdcm01$data
q.matrix <- data.tdcm01$q.matrix
# Estimate full TDCM with invariance assumed.
model1 <- TDCM::tdcm(data, q.matrix, num.time.points = 2)
# Summarize results with tdcm.summary().
results <- TDCM::tdcm.summary(model1, num.time.points = 2)
results$item.parameters
#> λ0 λ1,1 λ1,2 λ1,3 λ1,4 λ2,12 λ2,13 λ2,14 λ2,23 λ2,24
#> Item 1 -1.923 2.616 -- -- -- -- -- -- -- --
#> Item 2 -2.071 2.506 -- -- -- -- -- -- -- --
#> Item 3 -1.936 2.506 -- -- -- -- -- -- -- --
#> Item 4 -1.891 1.051 1.471 -- -- 1.115 -- -- -- --
#> Item 5 -2.157 1.705 -- 1.732 -- -- 0.835 -- -- --
#> Item 6 -1.841 -- 2.175 -- -- -- -- -- -- --
#> Item 7 -1.841 -- 2.272 -- -- -- -- -- -- --
#> Item 8 -1.965 -- 2.475 -- -- -- -- -- -- --
#> Item 9 -2.029 -- 1.242 1.531 -- -- -- -- 1.628 --
#> Item 10 -2.004 -- 1.921 -- 1.239 -- -- -- -- 0.999
#> Item 11 -1.851 -- -- 2.349 -- -- -- -- -- --
#> Item 12 -2.045 -- -- 2.566 -- -- -- -- -- --
#> Item 13 -2.083 -- -- 2.576 -- -- -- -- -- --
#> Item 14 -2.125 -- -- 1.739 2.104 -- -- -- -- --
#> Item 15 -1.805 0.777 -- 1.31 -- -- 1.896 -- -- --
#> Item 16 -2.156 -- -- -- 2.736 -- -- -- -- --
#> Item 17 -2.089 -- -- -- 2.679 -- -- -- -- --
#> Item 18 -2.087 -- -- -- 2.476 -- -- -- -- --
#> Item 19 -2.11 2.219 -- -- 1.46 -- -- 0.558 -- --
#> Item 20 -2.047 -- 2.408 -- 1.49 -- -- -- -- 0.154
#> λ2,34
#> Item 1 --
#> Item 2 --
#> Item 3 --
#> Item 4 --
#> Item 5 --
#> Item 6 --
#> Item 7 --
#> Item 8 --
#> Item 9 --
#> Item 10 --
#> Item 11 --
#> Item 12 --
#> Item 13 --
#> Item 14 0.493
#> Item 15 --
#> Item 16 --
#> Item 17 --
#> Item 18 --
#> Item 19 --
#> Item 20 --
results$growth
#> T1[1] T2[1]
#> Attribute 1 0.201 0.372
#> Attribute 2 0.327 0.492
#> Attribute 3 0.397 0.573
#> Attribute 4 0.252 0.696
results$transition.probabilities
#> , , Attribute 1: Time 1 to Time 2
#>
#> T2 [0] T2 [1]
#> T1 [0] 0.678 0.322
#> T1 [1] 0.432 0.568
#>
#> , , Attribute 2: Time 1 to Time 2
#>
#> T2 [0] T2 [1]
#> T1 [0] 0.578 0.422
#> T1 [1] 0.363 0.637
#>
#> , , Attribute 3: Time 1 to Time 2
#>
#> T2 [0] T2 [1]
#> T1 [0] 0.55 0.45
#> T1 [1] 0.24 0.76
#>
#> , , Attribute 4: Time 1 to Time 2
#>
#> T2 [0] T2 [1]
#> T1 [0] 0.365 0.635
#> T1 [1] 0.123 0.877
#>
# }