Introduction to Exploratory Diagnostic Models

Exploratory Diagnostic Models (EDMs) are versions of classical Cognitive Diagnostic Models (CDMs) that do not require the component of an expertly crafted Q matrix. This class of models is new to the world of psychometric models. The goal of the edm package is to provide an official implementation of the methodology by the authors that developed it!

Before we continue, please “bookmark” the TMSALab organization on GitHub:

https://github.com/tmsalab/

The website provides direct access to the developers behind the estimation packages being discussed today. In particular, it features the ability to file issues or bug reports, ask questions, or stay up-to-date in the latest breakthroughs.

Installation

In this section, we show the steps required to install the package locally. Please note, that the edm package is currently only available via GitHub as it is still being developed. As a result, you presently cannot install the package using install.packages('edm').

Presently, to install the edm package, your computer will need to have a compiler. To assist in setting up the compiler, we’ve created the following guides:

From there, please use devtools to retrieve the latest development version.

if(!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")
remotes::install_github("tmsalab/edm")

Loading the Package

Accessing the edm rountines requires loading the package into R. Please load the edm package by pressing “run”

The edm package has an accompanying data package called edmdata. Please load this package into R by substituting edm with edmdata in the library() call.

Supplementary Data Sets

The edmdata package presently comes equipped with three different data sets:

  • Examination for the Certificate of Proficiency in English (ECPE), Templin, J. and Hoffman, L. (2013).
    • items_ecpe, N = 2922 subject responses to J = 28 items.
    • qmatrix_ecpe, J = 28 items and K = 3 traits.
  • Fraction Addition and Subtraction, Tatsuoka, K. K. (1984).
    • items_fractions: N = 536 subject responses to J = 20 items.
    • qmatrix_fractions: J = 20 items and K = 8 traits.
  • Revised PSVT:R, Culpepper and Balamuta (2013).
    • items_spatial: N = 516 subject responses to J = 30 items.

Let’s take a look at Fraction Addition and Subtraction data sets. Typing the name of each data set and running the command will load the data into R if the edmdata package is loaded. As these data sets are relatively big, let’s use the function head() to view on the first 6 rows.

head( items_fractions )
#>            Item01 Item02 Item03 Item04 Item05 Item06 Item07 Item08 Item09
#> Subject001      0      0      0      1      0      0      1      1      0
#> Subject002      0      1      1      1      0      1      1      1      1
#> Subject003      0      1      1      1      0      1      1      1      0
#> Subject004      1      1      1      1      1      1      0      1      0
#> Subject005      0      0      0      1      0      1      0      1      0
#> Subject006      0      0      0      0      0      1      0      1      1
#>            Item10 Item11 Item12 Item13 Item14 Item15 Item16 Item17 Item18
#> Subject001      1      1      1      0      1      1      1      0      1
#> Subject002      1      1      1      1      1      1      1      1      1
#> Subject003      0      0      0      0      1      1      1      0      0
#> Subject004      1      1      1      0      1      0      1      0      1
#> Subject005      0      0      1      0      0      0      0      0      0
#> Subject006      0      0      0      0      1      0      0      0      0
#>            Item19 Item20
#> Subject001      1      1
#> Subject002      1      1
#> Subject003      0      0
#> Subject004      0      1
#> Subject005      0      0
#> Subject006      0      0
head( qmatrix_fractions )
#>        Trait1 Trait2 Trait3 Trait4 Trait5 Trait6 Trait7 Trait8
#> Item01      0      0      0      1      0      1      1      0
#> Item02      0      0      0      1      0      0      1      0
#> Item03      0      0      0      1      0      0      1      0
#> Item04      0      1      1      0      1      0      1      0
#> Item05      0      1      0      1      0      0      1      1
#> Item06      0      0      0      0      0      0      1      0

Within this guide, we will use the following notation:

  • \(K\): Number of Traits (columns) in the Q Matrix
  • \(J\): Number of Items (rows/columns) in the Q Matrix and Item Matrix
  • \(N\): Number of Subjects (rows) in the Item Matrix

To retrieve this information in R, we can use the dimension function, dim(), which lists the size of the data as rows by columns.

Find the dimensions of the items_fractions and qmatrix_fractions

dim(items_fractions)
#> [1] 536  20
dim(qmatrix_fractions)
#> [1] 20  8

Help!

Each function within the package contains a help file that is associated with. Some of the functions have worked exercises as well. To view this information type either ?function_name or help(function_name). Let’s verify the previously acquired numbers for the items_fractions data set by checking the entry in the documentation.

?items_fractions
?qmatrix_fractions

If you are curious to see how a function performs, you can opt to use example(function_name, package = "edm"). Be aware that some examples may take considerably longer than the rest.