-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME.Rmd
100 lines (71 loc) · 2.79 KB
/
README.Rmd
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# dina
<!-- badges: start -->
[](https://github.com/tmsalab/dina/actions)
[-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
[](https://cran.r-project.org/package=dina)
[](https://cran.r-project.org/web/checks/check_results_dina.html)
[](http://www.r-pkg.org/pkg/dina)
[](http://www.r-pkg.org/pkg/dina)
[](https://codecov.io/github/tmsalab/dina?branch=master)
<!-- badges: end -->
Estimate the Deterministic Input, Noisy And Gate (DINA) cognitive diagnostic
model parameters using the Gibbs sampler described by Culpepper (2015)
<doi: 10.3102/1076998615595403>.
## Installation
You can install `dina` from CRAN using:
```{r cran-installation, eval = FALSE}
install.packages("dina")
```
Or, you can be on the cutting-edge development version on GitHub using:
```{r gh-installation, eval = FALSE}
if(!requireNamespace("devtools")) install.packages("devtools")
devtools::install_github("tmsalab/dina")
```
## Usage
To use the `dina` package, load it into _R_ using:
```{r example, message = FALSE}
library("dina")
```
From there, the DINA CDM can be estimated using:
```{r dina-est, eval = FALSE}
dina_model = dina(<data>, <q>, chain_length = 10000)
```
To simulate item data under DINA, use:
```{r dina-sim, eval = FALSE}
# Set a seed for reproducibility
set.seed(888)
# Setup Parameters
N = 15 # Number of Examinees / Subjects
J = 10 # Number of Items
K = 2 # Number of Skills / Attributes
# Assign slipping and guessing values for each item
ss = gs = rep(.2, J)
# Simulate identifiable Q matrix
Q = sim_q_matrix(J, K)
# Simulate subject attributes
subject_alphas = sim_subject_attributes(N, K)
# Simulate Item Data
items_dina = sim_dina_items(subject_alphas, Q, ss, gs)
```
## Authors
Steven Andrew Culpepper and James Joseph Balamuta
## Citing the `dina` package
To ensure future development of the package, please cite `dina`
package if used during an analysis or simulation studies. Citation information
for the package may be acquired by using in *R*:
```{r, eval = FALSE}
citation("dina")
```
## License
GPL (>= 2)