din.deterministic.Rd
This function allows the estimation of the mixed DINA/DINO model by joint maximum likelihood and a deterministic classification based on ideal latent responses.
din.deterministic(dat, q.matrix, rule="DINA", method="JML", conv=0.001,
maxiter=300, increment.factor=1.05, progress=TRUE)
Data frame of dichotomous item responses
Q-matrix with binary entries (see din
).
The condensation rule (see din
).
Estimation method. The default is joint maximum likelihood estimation
(JML
). Other options include an adaptive estimation of guessing and
slipping parameters (adaptive
) while using these estimated parameters
as weights in the individual deviation function and classification based on
the Hamming distance (hamming
) and the weighted Hamming
distance (weighted.hamming
) (see Chiu & Douglas, 2013).
Convergence criterion for guessing and slipping parameters
Maximum number of iterations
A numeric value of at least one which could help to improve convergence behavior and decreases parameter increments in every iteration. This option is disabled by setting this argument to 1.
An optional logical indicating whether the function should print the progress of iteration in the estimation process.
A list with following entries
Estimated attribute patterns
Criterion of the classification function. For joint maximum likelihood it is the deviance.
Estimated guessing parameters
Estimated slipping parameters
Average individual prediction error
Used Q-matrix
Used data frame
Chiu, C. Y., & Douglas, J. (2013). A nonparametric approach to cognitive diagnosis by proximity to ideal response patterns. Journal of Classification, 30, 225-250.
For estimating the mixed DINA/DINO model using marginal maximum
likelihood estimation see din
.
See also the NPCD::JMLE
function in the NPCD package for
joint maximum likelihood estimation of the DINA or the DINO model.
#############################################################################
# EXAMPLE 1: 13 items and 3 attributes
#############################################################################
set.seed(679)
N <- 3000
# specify true Q-matrix
q.matrix <- matrix( 0, 13, 3 )
q.matrix[1:3,1] <- 1
q.matrix[4:6,2] <- 1
q.matrix[7:9,3] <- 1
q.matrix[10,] <- c(1,1,0)
q.matrix[11,] <- c(1,0,1)
q.matrix[12,] <- c(0,1,1)
q.matrix[13,] <- c(1,1,1)
q.matrix <- rbind( q.matrix, q.matrix )
colnames(q.matrix) <- paste0("Attr",1:ncol(q.matrix))
# simulate data according to the DINA model
dat <- CDM::sim.din( N=N, q.matrix)$dat
# Joint maximum likelihood estimation (the default: method="JML")
res1 <- CDM::din.deterministic( dat, q.matrix )
# Adaptive estimation of guessing and slipping parameters
res <- CDM::din.deterministic( dat, q.matrix, method="adaptive" )
# Classification using Hamming distance
res <- CDM::din.deterministic( dat, q.matrix, method="hamming" )
# Classification using weighted Hamming distance
res <- CDM::din.deterministic( dat, q.matrix, method="weighted.hamming" )
if (FALSE) {
#********* load NPCD library for JML estimation
library(NPCD)
# DINA model
res <- NPCD::JMLE( Y=dat[1:100,], Q=q.matrix, model="DINA" )
as.data.frame(res$par.est ) # item parameters
res$alpha.est # skill classifications
# RRUM model
res <- NPCD::JMLE( Y=dat[1:100,], Q=q.matrix, model="RRUM" )
as.data.frame(res$par.est )
}