-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
88 lines (60 loc) · 2.39 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# DTComPair <a href="https://chstock.github.io/DTComPair/"><img src="man/figures/logo.png" align="right" height="139" alt="DTComPair website" /></a>
<!-- badges: start -->
[![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)
<!-- badges: end -->
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)
```