Learn R Programming

cases: Stratified Evaluation of Subgroup Classification Accuracy

cases is an R package to simultaneously assess classification accuracy of multiple classifiers in several subgroups (strata). For instance, it allows to asses the accuracy of multiple candidate (index) diagnostic tests which is often measured with

  • sensitivity (accuracy in the diseased subgroup) and
  • specificity (accuracy in the healthy subgroup).

A widespread goal in diagnostic accuracy studies a so-called co-primary analysis of these two endpoints, i.e. to show a significant benefit (compared to some benchmark) in sensitivity and specificity for at least one of the candidate classifiers. The package implements different methods for multiplicity adjustment for that purpose (e.g. Bonferroni, maxT, pairs bootstrap).


Installation

You can install the development version of cases from GitHub with:

# install.packages("remotes")
remotes::install_github('maxwestphal/cases', build_vignettes = TRUE)

Usage

A vignette which explains the basic functionality of the cases package can be displayed as follows:

vignette(topic="package_overview", package = "cases")

The following vignette shows an exemplary usage of the package in the context of biomarker assessment and prediction model evaluation:

vignette(topic="example_wdbc", package = "cases")

References

Copy Link

Version

Install

install.packages('cases')

Monthly Downloads

180

Version

0.1.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

May 18th, 2023

Functions in cases (0.1.1)

compare

Compare predictions and labels
complete_results

Complete evaluation results
draw_data

Generate binary data
data_wdbc

Breast Cancer Wisconsin (Diagnostic) Data Set
draw_data_lfc

Generate binary data (LFC model)
define_contrast

Define a contrast (matrix) to specify exact hypothesis system
evaluate

Evaluate the accuracy of multiple (candidate) classifiers in several subgroups
process_instance

Analyze simulated synthetic datasets.
visualize

Visualize evaluation results
generate_instance_roc

Generate data sets under realistic parameter configurations
generate_instance_lfc

Generate data sets under least favorable parameter configurations
cases

cases package
%>%

Pipe operator
categorize

Categorize continuous values
cormat_ar1

Create an AR(1) correlation matrix
cormat_equi

Create an equicorrelation matrix
draw_data_prb

Sample binary data (single sample)
draw_data_roc

Generate binary data (ROC model)