Learn R Programming

CDM (version 2.7-7)

data.ecpe: Dataset ECPE

Description

ECPE dataset from the Templin and Hoffman (2013) tutorial of specifying cognitive diagnostic models in Mplus.

Usage

data(data.ecpe)

Arguments

format

The format of the data is a list containing the dichotomous item response data data (2922 persons at 28 items) and the Q-matrix q.matrix (28 items and 3 skills): List of 2 $ data :'data.frame': ..$ id : int [1:2922] 1 2 3 4 5 6 7 8 9 10 ... ..$ E1 : int [1:2922] 1 1 1 1 1 1 1 0 1 1 ... ..$ E2 : int [1:2922] 1 1 1 1 1 1 1 1 1 1 ... ..$ E3 : int [1:2922] 1 1 1 1 1 1 1 1 1 1 ... ..$ E4 : int [1:2922] 0 1 1 1 1 1 1 1 1 1 ... [...] ..$ E27: int [1:2922] 1 1 1 1 1 1 1 0 1 1 ... ..$ E28: int [1:2922] 1 1 1 1 1 1 1 1 1 1 ... $ q.matrix:'data.frame': ..$ skill1: int [1:28] 1 0 1 0 0 0 1 0 0 1 ... ..$ skill2: int [1:28] 1 1 0 0 0 0 0 1 0 0 ... ..$ skill3: int [1:28] 0 0 1 1 1 1 1 0 1 0 ... The skills are skill1: Morphosyntactic rules skill2: Cohesive rules skill3: Lexical rules.

source

The dataset is used in Templin and Hoffman (2013). The dataset was downloaded from http://psych.unl.edu/jtemplin/teaching/dcm/dcm12ncme/.

Example Index

sim.din (Example 3), sim.gdina (Examples 2, 3)

References

Templin, J., & Hoffman, L. (2013). Obtaining diagnostic classification model estimates using Mplus. Educational Measurement: Issues and Practice, 32, 37-50.

Examples

Run this code
data(data.ecpe)

# Model 1: LCDM model 
mod1 <- gdina( data.ecpe$data[,-1], q.matrix= data.ecpe$q.matrix , link="logit")
summary(mod1)

# Model 2: DINA model 
mod2 <- gdina( data.ecpe$data[,-1], q.matrix= data.ecpe$q.matrix , rule="DINA")
summary(mod2)

# Model comparison using likelihood ratio test
anova(mod1,mod2)
##       Model   loglike Deviance Npars      AIC      BIC    Chisq df  p
##   2 Model 2 -42841.61 85683.23    63 85809.23 86185.97 206.0359 18  0
##   1 Model 1 -42738.60 85477.19    81 85639.19 86123.57       NA NA NA

Run the code above in your browser using DataLab