-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPractice DCM.Rmd
128 lines (90 loc) · 1.84 KB
/
Practice DCM.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
title: "Practice DCM"
author: "Jeff Hoover"
date: "January 17, 2019"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
#load packages
library(tidyverse)
library(csvread)
library(difR)
library(tinytex)
library(CDM)
```
```{r}
#load the data
data <- fraction.subtraction.data
#load the qmatrix
qmatrix <- fraction.subtraction.qmatrix
```
#DINA
```{r}
dina <- din(data = data, q.matrix = qmatrix, guess.equal = .2, slip.equal = .1,
maxit = 500, rule = "DINA")
```
\pagebreak
#Print DINA
```{r}
print(dina)
```
\pagebreak
#DINA Summary
```{r}
summary(dina)
```
\pagebreak
#DINA Person-Fit
```{r}
person <- personfit.appropriateness(data = data, dina$pjk,
dina$attribute.patt[,1], maxiter = 8)
summary(person)
plot(person)
```
\pagebreak
#DINO
```{r}
dino <- din(data = data, q.matrix = qmatrix, guess.equal = .2, slip.equal = .1,
maxit = 500, rule = "DINO")
```
\pagebreak
#Print DINO
```{r}
print(dino)
```
\pagebreak
#DINO Summary
```{r}
summary(dino)
```
\pagebreak
#DINO Person-Fit
```{r}
person2 <- personfit.appropriateness(data = data, dino$pjk,
dino$attribute.patt[,1], maxiter = 8)
summary(person2)
plot(person2)
```
\pagebreak
#GDINA
```{r include = FALSE}
gdina <- gdina(data = data, q.matrix = qmatrix, guess.equal =.2, slip.equal =.1,
maxit = 500, rule = "GDINA")
```
\pagebreak
#Print GDINA
```{r}
print(gdina)
```
```{r}
#summary(gdina)
```
\pagebreak
#GDINA Person-Fit
```{r}
person3 <- personfit.appropriateness(data = data, gdina$pjk,
gdina$attribute.patt[,1], maxiter = 8)
summary(person3)
plot(person3)
```