-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.Rmd
67 lines (45 loc) · 2.47 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
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.path = "man/figures/README-")
set.seed(1)
```
# rater <img src="man/figures/rater.png" align="right" width="160" />
<!-- badges: start -->
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/rater)](https://cran.r-project.org/package=rater)
[![R build status](https://github.com/jeffreypullin/rater/workflows/R-CMD-check/badge.svg)](https://github.com/jeffreypullin/rater/actions)
[![Coverage status](https://codecov.io/gh/jeffreypullin/rater/branch/master/graph/badge.svg)](https://codecov.io/github/jeffreypullin/rater?branch=master)
![pkgdown](https://github.com/jeffreypullin/rater/workflows/pkgdown/badge.svg)
<!-- badges: end -->
**rater** provides tools for fitting and interrogating statistical models of repeated categorical rating data. The package provides a simple interface to fit a selection of these models, with arbitrary priors, using MCMC and optimisation provided by [Stan](https://mc-stan.org/). A selection of functions are also provided to plot parts of these models and extract key parameters.
## Example usage:
```{r fit-demo, message = FALSE, warning = FALSE, results = "hide"}
library(rater)
fit <- rater(anesthesia, "dawid_skene") # sampling output suppressed
```
Get the posterior mean of the "pi" parameter.
```{r extract-demo}
point_estimate(fit, pars = "pi")
```
Plot the accuracy matrices of the raters.
```{r plot-demo}
plot(fit, pars = "raters")
```
## Installation
**rater** requires the **rstan** package to fit models. Detailed instructions to install **rstan** can be found [here](https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started)
### CRAN
**rater** is not *yet* on CRAN; when it is you will be able to install it with:
```{r cran-installation, eval = FALSE}
#install.packages("rater")
```
### Development
To install the development version of **rater** from GitHub run:
```{r dev-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("jeffreypullin/rater")
```
#### Installation notes:
- When installing from source, i.e. when installing the development version or installing from CRAN on Linux, the **Stan** models in the package will be compiled - this will lead to an install time of few minutes. Please be patient - this compilation means that **no** compilation is required when using the package
- During compilation many warnings may be displayed in the terminal; these
are harmless but impossible to suppress.