DTM | R Documentation |
This function estimates the diagnostic tree model (Ma, 2018) for polytomous responses with multiple strategies. It can also handle various polytomous models discussed in Gao, et al. (2021).
DTM(
dat,
Qc,
type = "tree",
linkfunc = "logit",
eq.const = FALSE,
delta = NULL,
Tmatrix = NULL,
conv.crit = 0.001,
conv.type = "pr",
maxitr = 1000
)
dat |
A required |
Qc |
A required |
type |
what type of model is to be fit; can be |
linkfunc |
link function used; |
eq.const |
whether effects are constrained to be equal across categories; |
delta |
initial item parameters |
Tmatrix |
The mapping matrix showing the relation between the OBSERVED responses (rows) and the PSEDUO items (columns); The first column gives the observed responses. |
conv.crit |
The convergence criterion for max absolute change in item parameters. |
conv.type |
convergence criteria; Can be |
maxitr |
The maximum iterations allowed. |
Wenchao Ma, The University of Minnesota, wma@umn.edu
Gao, X., Ma, W., Wang, D., Cai, Y., & Tu, D. (2021). A class of cognitive diagnosis models for polytomous data. Journal of Educational and Behavioral Statistics, 46, 297-322. Ma, W. (2018). A Diagnostic Tree Model for Polytomous Responses with Multiple Strategies. British Journal of Mathematical and Statistical Psychology.
GDINA
for MS-DINA model and single strategy CDMs,
and GMSCDM
for generalized multiple strategies CDMs for dichotomous response data
## Not run:
####################################
# Example 1. #
# sequential G-DINA model. #
# #
####################################
dat <- sim20seqGDINA$simdat
Qc <- sim20seqGDINA$simQ
fit=DTM(sim20seqGDINA$simdat,Qc,type="sequential")
fit
fit$testfit$AIC
####################################
# Example 2. #
# Tree model #
# #
####################################
K=5
g=0.2
item.no <- rep(1:6,each=4)
# the first node has three response categories: 0, 1 and 2
node.no <- rep(c(1,1,2,3),6)
Q1 <- matrix(0,length(item.no),K)
Q2 <- cbind(7:(7+K-1),rep(1,K),diag(K))
for(j in 1:length(item.no)) {
Q1[j,sample(1:K,sample(3,1))] <- 1
}
Qc <- rbind(cbind(item.no,node.no,Q1),Q2)
Tmatrix.set <- list(cbind(c(0,1,2,3,3),c(0,1,2,1,2),c(NA,0,NA,1,NA),c(NA,NA,0,NA,1)),
cbind(c(0,1,2,3,4),c(0,1,2,1,2),c(NA,0,NA,1,NA),c(NA,NA,0,NA,1)),
cbind(c(0,1),c(0,1)))
Tmatrix <- Tmatrix.set[c(1,1,1,1,1,1,rep(3,K))]
sim <- simDTM(N=2000,Qc=Qc,gs.parm=matrix(0.2,nrow(Qc),2),Tmatrix=Tmatrix)
est <- DTM(dat=sim$dat,Qc=Qc,Tmatrix = Tmatrix)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.