Skip to content

R package to fit statistical models to repeated categorical rating data using Stan

License

Notifications You must be signed in to change notification settings

jeffreypullin/rater

Repository files navigation

rater

CRAN_Status_Badge R build status Coverage status pkgdown

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. A selection of functions are also provided to plot parts of these models and extract key parameters.

Example usage:

library(rater)

fit <- rater(anesthesia, "dawid_skene") # sampling output suppressed

Get the posterior mean of the “pi” parameter.

point_estimate(fit, pars = "pi")
## $pi
## [1] 0.37374331 0.40673620 0.14712032 0.07240018

Plot the accuracy matrices of the raters.

plot(fit, pars = "raters")

Installation

rater requires the rstan package to fit models. Detailed instructions to install rstan can be found here

CRAN

rater is not yet on CRAN; when it is you will be able to install it with:

#install.packages("rater")

Development

To install the development version of rater from GitHub run:

# 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.