-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
114 lines (76 loc) · 3.14 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
output:
github_document:
df_print: kable
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
## conquestr
ConQuest generalised item response modelling software (Wu, Adams, Wilson, & Haldane, 2007) is used for a wide variety of purposes including the analysis of educational assessment data.
`conquestr` is an R package whose first goal was to make it easier to import ConQuest item analysis files into R. This functionality does not appear to be available in other R packages as far as we are aware.
## Other resources
Several other R packages already integrate with ConQuest to various degrees. For example:
See [TAM](https://CRAN.R-project.org/package=TAM) if you'd like to do analysis similar to ConQuest within R.
The `R2conquest` function in the [sirt](https://CRAN.R-project.org/package=sirt) package provides functionality for using ConQuest from within R.
The [WrightMap](https://CRAN.R-project.org/package=WrightMap) package also contains various features for working with ConQuest and other IRT packages.
## Installation
You can install `conquestr` from github with:
```{r gh-install, eval = FALSE}
# install.packages("devtools")
devtools::install_github("markdly/conquestr")
```
Alternatively, the latest updates are made and tested using the develop branch which can be installed with
```{r gh-dev-install, eval = FALSE}
# install.packages("devtools")
devtools::install_github("markdly/conquestr#develop")
```
## Example
First load the relevant packages
```{r, message = FALSE}
library(conquestr)
```
Take a ConQuest version 2 item analysis file. In ConQuest, item analysis text files are generated by the ConQuest itanal command (e.g. `itanal >> my_item_analysis_file.itn;`). An example item analysis file is included with `conquestr` out of the box:
```{r example}
cq_example()
```
Use the example file to try out the other functions. The main one is `cq_itanal`:
```{r}
# get the path to the example itanal file that comes with conquestr
fname <- cq_example(display = FALSE)
# import the itanal as a tibble
df <- cq_itanal(fname)
```
Once imported, the original text imported for each 'item' can be found in the `data` column.
```{r}
df$data[1]
```
Item level details are provided in separate columns:
```{r}
head(dplyr::select(df, -c(data, resp_stat)))
```
The details for each response category is contained in the list column `resp_stat`. The function `cq_resp_stats()` makes viewing these easier:
```{r}
head(cq_resp_stats(df))
```
## Other examples
### Plausible values files
```{r pv_example}
fname <- cq_example(display = FALSE, example_name = "ex1_10.pv")
pv <- cq_pv(fname, np = 10)
head(pv)
```
By default the pv files are imported in long format. To convert them to a more typical 'wide' format one way this can be done is:
```{r pv_wide, message=FALSE}
library(dplyr)
library(tidyr)
pv_wide <- pv %>% select(recid, field, val) %>% spread(field, val)
head(pv_wide)
```
## References
Wu, M., Adams, R., Wilson, M., & Haldane, S. (2007). ConQuest Version 2: Generalised Item Response Modelling Software.