An open API service indexing awesome lists of open source software.

https://github.com/chstock/dtcompair

Comparison of Binary Diagnostic Tests in a Paired Study Design
https://github.com/chstock/dtcompair

clinical-epidemiology comparative-analysis cran diagnosis diagnostic-accuracy-studies diagnostic-likelihood-ratio diagnostic-tests medicine predictive-value r r-package sensitivity specificity

Last synced: about 2 months ago
JSON representation

Comparison of Binary Diagnostic Tests in a Paired Study Design

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# DTComPair DTComPair website

[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![CRAN status](https://www.r-pkg.org/badges/version/DTComPair)](https://CRAN.R-project.org/package=DTComPair)
[![](http://cranlogs.r-pkg.org/badges/last-month/DTComPair)](https://cran.r-project.org/package=DTComPair)
[![](http://cranlogs.r-pkg.org/badges/grand-total/DTComPair)](https://cran.r-project.org/package=DTComPair)

Comparison of the accuracy of two binary diagnostic tests in a "paired" study design, i.e. when each test is applied to each subject in the study.

## Installation

**CRAN**

You can install the current stable version from CRAN with:

```{r cran-installation, eval = FALSE}
install.packages("DTComPair")
```

**GitHub**

You can install the current development version from GitHub with:

```{r gh-installation, eval = FALSE}
if (!require("remotes")) {install.packages("remotes")}
remotes::install_github("chstock/DTComPair")
```

## Scope

Diagnostic accuracy measures that can be computed and compared are sensitivity, specificity, positive and negative predictive values, and positive and negative diagnostic likelihood ratios.

## Getting Started

**Determine the accuracy of one diagnostic test**

```{r getting-started1}
library(DTComPair)
data(Paired1) # Hypothetical study data
a1 <- tab.1test(d=d, y=y1, data=Paired1)
print(a1)
a1 |> acc.1test(method.ci = "waldci") # default Wald intervals
a1 |> acc.1test(method.ci = "exactci") # Clopper-Pearson intervals
```

**Compare the accuracy of two diagnostic tests**

***Compute accuracy measures***
```{r getting-started2}
b1 <- tab.paired(d = d, y1 = y1, y2 = y2, data = Paired1)
print(b1)
b1 |> acc.paired(method.ci = "scoreci") # Wilson intervals
```

***Compare predictive values***

Test based on weighted generalized score statistic:
```{r getting-started3a}
pv.wgs(b1)
```

Estimation and test of relative predictive values:
```{r getting-started3b}
pv.rpv(b1)
```