knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(edm) library(edmdata)
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:
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.
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")
Accessing the edm
rountines requires loading the package into R. Please
load the edm
package by pressing "run"
library(edm)
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.
library( edmdata )
The edmdata
package presently comes equipped with three different data sets:
items_ecpe
, N = 2922 subject responses to J = 28 items.qmatrix_ecpe
, J = 28 items and K = 3 traits. items_fractions
: N = 536 subject responses to J = 20 items.qmatrix_fractions
: J = 20 items and K = 8 traits. 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 ) head( qmatrix_fractions )
Within this guide, we will use the following notation:
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) dim(qmatrix_fractions)
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.