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

DTComPair DTComPair website

Lifecycle: stable CRAN status

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:

install.packages("DTComPair")

GitHub

You can install the current development version from GitHub with:

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

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

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:

pv.wgs(b1)  

Estimation and test of relative predictive values:

pv.rpv(b1)


chstock/DTComPair documentation built on Sept. 27, 2024, 3:35 a.m.