confIntIndependentAUCDiff: Confidence interval for the difference in AUC based on two...

View source: R/confIntAUC.R

confIntIndependentAUCDiffR Documentation

Confidence interval for the difference in AUC based on two independent samples

Description

Computes confidence interval for the difference in the area under the curve based on two independent samples.

Usage

confIntIndependentAUCDiff(
  casesA,
  controlsA,
  casesB,
  controlsB,
  type = c("Wald", "logit"),
  conf.level = 0.95
)

Arguments

casesA

Values of the continuous variable from Test A for the cases.

controlsA

Values of the continuous variable from Test A for the controls.

casesB

Values of the continuous variable from Test B for the cases.

controlsB

Values of the continuous variable from Test B for the controls.

type

"Wald" (default) or "logit".

conf.level

Confidence level for confidence interval. Default is 0.95.

Details

For type="Wald", standard Wald confidence intervals are calculated for AUC of both tests and their difference. For type="logit", the substitution method is used based on the logit transformation for the AUC of both tests. The confidence interval for the difference in AUC is then calculated using Newcombe's method.

Value

A data.frame with estimate and confidence limits for AUC of the two tests and their difference.

Author(s)

Leonhard Held

References

Newcombe, R.G. (1998). Interval estimation for the difference between independent proportions: Comparison of eleven methods. Stat. Med., *17*, 873-890.

Pepe, M.S. (2003) The statistical evaluation of medical tests for classification and prediction. Oxford University Press.

See Also

confIntAUC, confIntPairedAUCDiff, standardErrorAUCDiff

Examples


set.seed(12345)
casesA <- rnorm(n = 200, mean = 2.5)
controlsA <- rnorm(n = 100)
casesB <- rnorm(n = 100, mean = 1.5)
controlsB <- rnorm(n = 200)

confIntIndependentAUCDiff(casesA = casesA, controlsA = controlsA,
                          casesB = casesB, controlsB = controlsB, type = "Wald")
confIntIndependentAUCDiff(casesA = casesA, controlsA = controlsA,
                          casesB = casesB, controlsB = controlsB, type = "logit")


felix-hof/biostatUZH documentation built on Sept. 27, 2024, 1:48 p.m.