Learn R Programming

CDM (version 2.7-7)

din.deterministic: Deterministic Classification and Joint Maximum Likelihood Estimation of the Mixed DINA/DINO Model

Description

This function allows the estimation of the mixed DINA/DINO model by joint maximum likelihood and a deterministic classification based on ideal latent responses.

Usage

din.deterministic(dat, q.matrix, rule="DINA" , method = "JML", conv = 0.001, 
    maxiter = 300, increment.factor = 1.05, progress = TRUE)

Arguments

dat
Data frame of dichotomous item responses
q.matrix
Q-matrix with binary entries (see din)
rule
The condensation rule. See din
method
Estimation method. The deault 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
conv
Convergence criterion for guessing and slipping parameters
maxiter
Maximum number of iterations
increment.factor
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.
progress
An optional logical indicating whether the function should print the progress of iteration in the estimation process.

Value

  • A list with following entries
  • attr.estEstimated attribute patterns
  • criterionCriterion of the classification function. For joint maximum likelihood it is the deviance.
  • guessEstimated guessing parameters
  • slipEstimated slipping parameters
  • prederrorAverage individual prediction error
  • q.matrixUsed Q-matrix
  • datUsed data frame

References

Chiu, C. Y., & Douglas, J. (2013). A nonparametric approach to cognitive diagnosis by proximity to ideal response patterns. Journal of Classification, 30, 225-250.

See Also

For estimating the mixed DINA/DINO model using marginal maximum likelihood estimation see din. See also the JMLE function in the NPCD package for joint maximum likelihood estimation of the DINA or the DINO model.

Examples

Run this code
#############################################################################
# SIMULATED 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 <- sim.din( N=N , q.matrix)$dat

# Joint maximum likelihood estimation (the default: method="JML")
res1 <- din.deterministic( dat , q.matrix )

# Adaptive estimation of guessing and slipping parameters
res <- din.deterministic( dat , q.matrix , method="adaptive" )

# Classification using Hamming distance
res <- din.deterministic( dat , q.matrix , method="hamming" )

# Classification using weighted Hamming distance
res <- din.deterministic( dat , q.matrix , method="weighted.hamming" )

Run the code above in your browser using DataLab