din.validate.qmatrix: Q-Matrix Validation (Q-Matrix Modification) for Mixed...

Description Usage Arguments Value References See Also Examples

View source: R/din.validate.qmatrix.R

Description

Q-matrix entries can be modified by the Q-matrix validation method of de la Torre (2008). After estimating a mixed DINA/DINO model using the din function, item parameters and the item discrimination parameters IDI_j are recalculated. Q-matrix rows are determined by maximizing the estimated item discrimination index IDI_j = 1-s_j -g_j.

See Chiu (2013) for an alternative estimation approach based on residual sum of squares which is implemented in the NPCD package.

Usage

1
din.validate.qmatrix(object, digits = 3, print = TRUE)

Arguments

object

Object of class din

digits

Number of digits for rounding the output matrix

print

An optional logical indicating whether the function should print the progress of iteration in the estimation process.

Value

A list with following entries:

coef.modified

Estimated parameters by applying Q-matrix modifications

coef.modified.short

A shortened matrix of coef.modified. Only Q-matrix rows which increase the IDI are displayed.

q.matrix.prop

The proposed Q-matrix by Q-matrix validation.

References

Chiu, C. Y. (2013). Statistical refinement of the Q-matrix in cognitive diagnosis. Applied Psychological Measurement, 37, 598-618.

de la Torre, J. (2008). An empirically based method of Q-matrix validation for the DINA model: Development and applications. Journal of Educational Measurement, 45, 343-362.

See Also

The mixed DINA/DINO model can be estimated with din.

See also the NPCD::Qrefine function in the NPCD package.

See the GDINA::Qval function in the GDINA package for more extended functionality.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#############################################################################
# EXAMPLE 1: Detection of a mis-specified Q-matrix
#############################################################################

set.seed(679)
# specify true Q-matrix
q.matrix <- matrix( 0 , 12 , 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)
# simulate data
dat <- CDM::sim.din( N=4000 , q.matrix)$dat
# incorrectly modify Q-matrix rows 1 and 10
Q1 <- q.matrix
Q1[1,] <- c(1,1,0)
Q1[10,] <- c(1,0,0)
# estimate DINA model
mod <- CDM::din( dat , q.matr = Q1, rule = "DINA")
# apply Q-matrix validation
res <- CDM::din.validate.qmatrix( mod )  
  ## item itemindex Skill1 Skill2 Skill3 guess  slip   IDI qmatrix.orig IDI.orig delta.IDI max.IDI
  ## I001         1      1      0      0 0.309 0.251 0.440            0    0.431     0.009   0.440
  ## I010        10      1      1      0 0.235 0.329 0.437            0    0.320     0.117   0.437
  ## I010        10      1      1      1 0.296 0.301 0.403            0    0.320     0.083   0.437
  ##   
  ##   Proposed Q-matrix:
  ##   
  ##          Skill1 Skill2 Skill3
  ##   Item1       1      0      0
  ##   Item2       1      0      0
  ##   Item3       1      0      0
  ##   Item4       0      1      0
  ##   Item5       0      1      0
  ##   Item6       0      1      0
  ##   Item7       0      0      1
  ##   Item8       0      0      1
  ##   Item9       0      0      1
  ##   Item10      1      1      0
  ##   Item11      1      0      1
  ##   Item12      0      1      1

## Not run: 
#*****************
# Q-matrix estimation ('Qrefine') in the NPCD package
# See Chiu (2013, APM).
#*****************

library(NPCD)
Qrefine.out <- NPCD::Qrefine( dat, Q1, gate="AND", max.ite=50)
print(Qrefine.out)
  ##   The modified Q-matrix
  ##           Attribute 1 Attribute 2 Attribute 3
  ##   Item 1            1           0           0
  ##   Item 2            1           0           0
  ##   Item 3            1           0           0
  ##   Item 4            0           1           0
  ##   Item 5            0           1           0
  ##   Item 6            0           1           0
  ##   Item 7            0           0           1
  ##   Item 8            0           0           1
  ##   Item 9            0           0           1
  ##   Item 10           1           1           0
  ##   Item 11           1           0           1
  ##   Item 12           0           1           1
  ##   
  ##   The modified entries
  ##        Item Attribute
  ##   [1,]    1         2
  ##   [2,]   10         2

plot(Qrefine.out)

## End(Not run)

Example output

Loading required package: mvtnorm
**********************************
** CDM 5.8-9 (2017-08-07 17:48:04)       
** Cognitive Diagnostic Models
**********************************

---------------------------------------------------------------------------------
DINA MODEL 
** 2017-11-22 01:39:14 
---------------------------------------------------------------------------------
Iter.  1  :  01:39:14 ,   loglike =  -30756.28  / max. param. ch. :  0.234674  / relative deviance change :  1
Iter.  2  :  01:39:14 ,   loglike =  -30195.75  / max. param. ch. :  0.025131  / relative deviance change :  0.018563
Iter.  3  :  01:39:14 ,   loglike =  -30180.05  / max. param. ch. :  0.01137  / relative deviance change :  0.00052
Iter.  4  :  01:39:14 ,   loglike =  -30176.27  / max. param. ch. :  0.005565  / relative deviance change :  0.000125
Iter.  5  :  01:39:14 ,   loglike =  -30175.09  / max. param. ch. :  0.003129  / relative deviance change :  3.9e-05
Iter.  6  :  01:39:14 ,   loglike =  -30174.59  / max. param. ch. :  0.002255  / relative deviance change :  1.7e-05
Iter.  7  :  01:39:14 ,   loglike =  -30174.31  / max. param. ch. :  0.001702  / relative deviance change :  9e-06
Iter.  8  :  01:39:14 ,   loglike =  -30174.12  / max. param. ch. :  0.001341  / relative deviance change :  6e-06
Iter.  9  :  01:39:14 ,   loglike =  -30173.97  / max. param. ch. :  0.001092  / relative deviance change :  5e-06
Iter.  10  :  01:39:14 ,   loglike =  -30173.86  / max. param. ch. :  0.000912  / relative deviance change :  4e-06
---------------------------------------------------------------------------------
Time difference of 0.2208655 secs
   item itemindex Skill1 Skill2 Skill3 guess  slip   IDI qmatrix.orig IDI.orig
1  I001         1      1      0      0 0.309 0.251 0.440            0    0.431
34 I010        10      1      1      0 0.235 0.329 0.437            0    0.320
82 I010        10      1      1      1 0.296 0.301 0.403            0    0.320
   delta.IDI max.IDI
1      0.009   0.440
34     0.117   0.437
82     0.083   0.437

Proposed Q-matrix:

       Skill1 Skill2 Skill3
Item1       1      0      0
Item2       1      0      0
Item3       1      0      0
Item4       0      1      0
Item5       0      1      0
Item6       0      1      0
Item7       0      0      1
Item8       0      0      1
Item9       0      0      1
Item10      1      1      0
Item11      1      0      1
Item12      0      1      1
Loading required package: BB
Loading required package: R.oo
Loading required package: R.methodsS3
R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help.
R.oo v1.21.0 (2016-10-30) successfully loaded. See ?R.oo for help.

Attaching package: 'R.oo'

The following objects are masked from 'package:methods':

    getClasses, getMethods

The following objects are masked from 'package:base':

    attach, detach, gc, load, save

Iteration: 1
Iteration: 2
The Modified Q-matrix
        Attribute 1 Attribute 2 Attribute 3
Item 1            1           0           0
Item 2            1           0           0
Item 3            1           0           0
Item 4            0           1           0
Item 5            0           1           0
Item 6            0           1           0
Item 7            0           0           1
Item 8            0           0           1
Item 9            0           0           1
Item 10           1           1           0
Item 11           1           0           1
Item 12           0           1           1

The Modified Entries
     Item Attribute
[1,]    1         2
[2,]   10         2

CDM documentation built on Nov. 21, 2017, 9:04 a.m.