-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
128 lines (95 loc) · 3.27 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
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-"
)
```
# rrum
<!-- badges: start -->
[![R-CMD-check](https://github.com/tmsalab/rrum/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tmsalab/rrum/actions/workflows/R-CMD-check.yaml)
[![Package-License](https://img.shields.io/badge/license-GPL%20(%3E=2)-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN Version Badge](https://www.r-pkg.org/badges/version/rrum)](https://cran.r-project.org/package=rrum)
[![CRAN Status](https://badges.cranchecks.info/worst/rrum.svg)](https://cran.r-project.org/web/checks/check_results_rrum.html)
[![RStudio CRAN Mirror's Monthly Downloads](https://cranlogs.r-pkg.org/badges/rrum?color=brightgreen)](https://www.r-pkg.org/pkg/rrum)
[![RStudio CRAN Mirror's Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/rrum?color=brightgreen)](https://www.r-pkg.org/pkg/rrum)
<!-- badges: end -->
The goal of `rrum` is to provide an implementation of Gibbs sampling algorithm
for Bayesian Estimation of **Reduced Reparameterized Unified Model (rrum)**,
described by Culpepper and Hudson (2017) <doi: 10.1177/0146621617707511>.
## Installation
You can install `rrum` from CRAN using:
```{r}
#| label: cran-installation
#| eval: false
install.packages("rrum")
```
Or, you can be on the cutting-edge development version on GitHub using:
```{r}
#| label: gh-installation
#| eval: false
# install.packages('remotes')
remotes::install_github("tmsalab/rrum")
```
## Usage
To use `rrum`, load the package using:
```{r}
#| label: example
#| eval: false
library("rrum")
```
From here, the rRUM model can be estimated using:
```{r}
#| label: rrum-est
#| eval: false
rrum_model = rrum(<data>, <q>)
```
Additional parameters can be accessed with:
```{r}
#| label: rrum-est-adv
#| eval: false
rrum_model = rrum(<data>, <q>, chain_length = 10000L,
as = 1, bs = 1, ag = 1, bg = 1,
delta0 = rep(1, 2^ncol(Q)))
```
`rRUM` item data can be simulated using:
```{r}
#| label: rrum-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
# Simulate identifiable Q matrix
Q = sim_q_matrix(J, K)
# Penalties for failing to have each of the required attributes
rstar = .5 * Q
# The probabilities of answering each item correctly for individuals
# who do not lack any required attribute
pistar = rep(.9, J)
# Latent Class Probabilities
pis = c(.1, .2, .3, .4)
# Generate latent attribute profile with custom probability (N subjects by K skills)
subject_alphas = sim_subject_attributes(N, K, prob = pis)
# Simulate rrum items
rrum_items = simcdm::sim_rrum_items(Q, rstar, pistar, subject_alphas)
```
## Authors
Steven Andrew Culpepper, Aaron Hudson, and James Joseph Balamuta
## Citing the `rrum` package
To ensure future development of the package, please cite `rrum`
package if used during an analysis or simulation study. Citation information
for the package may be acquired by using in *R*:
```{r}
#| label: citation
#| eval: false
citation("rrum")
```
## License
GPL (>= 2)