MyNixOS website logo
Description

Tools for Evaluating Diagnostic Test Performance.

Evaluates diagnostic test performance using data from laboratory or diagnostic research. It includes functions to compute common performance indicators along with their confidence intervals, and offers an interactive 'shiny' application for comprehensive analysis including ROC curve visualization and related metrics. It supports both binary and continuous test variables. It allows users to compute key performance indicators and visualize Receiver Operating Characteristic (ROC) curves, determine optimal cut-off thresholds, display confusion matrix, and export publication-ready plot. It aims to facilitate the application of statistical methods in diagnostic test evaluation by healthcare professionals. Methodological details and references for the computation of performance indicators are provided in the package vignette.

EvalTest

Overview

EvalTest is an R package designed for evaluating diagnostic test performance. It aims to facilitate the application of statistical methods in diagnostic test evaluation by healthcare professionals.

Description

The 'EvalTest' package provides a function to compute diagnostic performance indicators alongside their confidence intervals and provides a 'Shiny' application for evaluating diagnostic test performance using data from laboratory or diagnostic research. It supports both binary and continuous test variables. It allows users to compute and visualize:

  • Confusion matrix: for binary test results (or threshold categorized quantitative test results) and disease status.

  • Key performance indicators: sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), likelihood ratios (LR+ and LR-), accuracy, and Youden index.

  • Receiver Operating Characteristic (ROC) curve: determine optimal cut-off thresholds of quantitative tests, display ROC plot and area under curve (AUC) with confidence intervals.

  • Outputs and plot: The application provides interactive tables and plots that can be exported for reporting purposes.

Installation

You can install the development version of 'EvalTest' from GitHub like so (if you have devtools package installed):

devtools::install_github("NassimAyad87/EvalTest", dependencies = TRUE)

Or from CRAN:

install.packages("EvalTest")

Compute diagnostic test indicators

Load the package:

library(EvalTest)

The function compute_indicators() computes sensitivity, specificity, predictive values, likelihood ratios, accuracy, and Youden index with their confidence intervals based on a 2x2 table of diagnostic test results:

compute_indicators(tp, fp, fn, tn, prev, conf = 0.95)

Where:

  • tp: True positives
  • fp: False positives
  • fn: False negatives
  • tn: True negatives
  • prev: Prevalence of the disease in the population (numeric between 0 and 1)
  • conf: Confidence level (default 0.95)

It returns a list with all diagnostic indicators and confidence intervals.

Using the Application

Launch the Shiny application using:

EvalTest::run_app()

This will open the application in your default web browser (or RStudio viewer pane) and follow these steps:

  • Before uploading your data, you should ensure that: the test variable is in one column (either qualitative or quantitative) and the reference variable (disease status) is in another column (binary: 1/0). There are no missing values in the selected columns.

  • Upload your data in Excel format (.xlsx).

  • Choose your variable test type (Qualitative or Quantitative).

  • Select the appropriate columns for test variable and reference variable (disease status).

  • Input disease prevalence value (between 0 and 1) of the study population.

  • Run the analysis and explore the results in the different tabs.

  • You can download the ROC plot and the results table for your report.

License

This package is licensed under the MIT License - see the LICENSE file for details.

Citation

To cite the 'EvalTest' package in publications, use this script:

citation("EvalTest")

Or just cite:

Metadata

Version

1.0.6

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows