View source: R/compute.threshold.AROC.sp.R
compute.threshold.AROC.sp | R Documentation |
Estimates AROC-based threshold values using the semiparametric approach proposed by Janes and Pepe (2009).
compute.threshold.AROC.sp(object, newdata, FPF = 0.5)
object |
An object of class |
newdata |
Data frame with the covariate values at which threshold values are required. |
FPF |
Numeric vector with the FPF at which to calculate the AROC-based threshold values. Atomic values are also valid. |
Estimation of the covariate-adjusted ROC curve (AROC) using the semiparametric approach proposed by Janes and Pepe (2009) involves the estimation of the conditional distribution function for the diagnostic test outcome in the healthy population
F_{\bar{D}}(y|\mathbf{X}_{\bar{D}}) = Pr\{Y_{\bar{D}} ≤q y | \mathbf{X}_{\bar{D}}\}.
This function makes use of this estimate in order to calculate AROC-based threshold values. In particular, for a covariate value \mathbf{x} and a FPF = t, the AROC-based threshold value is calculated as follows
\hat{c}_{\mathbf{x}} = \hat{F}^{-1}_{\bar{D}}(1-t|\mathbf{X}_{\bar{D}} = \mathbf{x}).
A matrix with the computed AROC-based threshold values. The matrix has as many columns as different covariate vector values, and as many rows as different FPFs.
Janes, H., and Pepe, M.S. (2009). Adjusting for covariate effects on classification accuracy using the covariate-adjusted receiver operating characteristic curve. Biometrika, 96(2), 371 - 382.
AROC.sp
library(AROC) data(psa) # Select the last measurement newpsa <- psa[!duplicated(psa$id, fromLast = TRUE),] # Log-transform the biomarker newpsa$l_marker1 <- log(newpsa$marker1) m3 <- AROC.sp(formula.healthy = l_marker1 ~ age, group = "status", tag.healthy = 0, data = newpsa, p = seq(0,1,l=101), B = 500) FPF = c(0.1, 0.3) newdata <- data.frame(age = seq(52, 80, l = 50)) th_sp <- compute.threshold.AROC.sp(m3, newdata, FPF) names(th_sp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.