adjusted.ROC: Confounders-Adjusted ROC Curves Without Right Censored Data.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/prog.R

Description

This function allows for the estimation of ROC curve by taking into account possible confounding factors. Two methods are implemented: i) the standardized and weighted ROC based on an IPW estimator, and ii) the placement values ROC.

Usage

1
adjusted.ROC(status, variable, confounders,  database, precision, estimator)

Arguments

status

A character string with the name of the variable in database which represents the disease status indicator (for instance: 0=healthy, 1=diseased).

variable

A character string with the name of the variable in database which represents the diagnostic/prognostic variable under interest. For the standardized and weighted ROC method, the variable must be previously standardized according to the covariates among the controls as proposed by Le Borgne et al. (2017).

confounders

An object of class "formula". More precisely only the right part with an expression of the form ~ model, where model is the linear predictor of the logistic regressions performed for each cut-off value. The user can use ~1 to obtain the crude estimation.

database

An object of the class data.frame containing the variables previously detailed.

precision

A numeric vector with values between 0 and 1. The values represent the x-axis (1-specificity) of the ROC graph for which the user want to obtain the corresponding sensitivities. 0 and 1 are not allowed.

estimator

Two possible estimators can be used: "ipw" and "pv". IPW is based on the Inverse Probability Weigthing theory as proposed by Le Borgne et al. (2017). This estimator applied on a variable standardized according to the covariates among the controls allows to obtain a standardized and weighted ROC. The IPW estimator is selected by default. The user can also use the placement values (pv) estimator as proposed by Pepe and Cai (Biometrics, 2004).

Details

This function computes confounder-adjusted ROC curve for uncensored data. We adapted the usual estimator by considering the individual probabilities to be diseased, given the possible confounding factors. The standardized and weighted ROC is obtained by both providing a variable under interest standardized according to the possible confounding factors and using "ipw" in the option estimator. The user can also use the estimator first proposed by Pepe and Cai (2004) which is based on placement values.

Value

table

This data frame presents the sensitivities and specificities.

auc

The area under the ROC curve.

Author(s)

Y. Foucher <Yohann.Foucher@univ-nantes.fr>

References

Blanche P, Dartigues J, Jacqmin-Gadda H. (2013) Review and comparison of roc curve estimators for a time-dependent outcome with marker-dependent censoring. Biometrical Journal, 55, 687-704. <doi:10.1002/bimj.201200045>

Pepe MS and Cai T. (2004) The analysis of placement values for evaluating discriminatory measures. Biometrics, 60(2), 528-35. <doi:10.1111/j.0006-341X.2004.00200.x>

Le Borgne F. et al. (2017) Standardized and weighted time-dependent ROC curves to evaluate the intrinsic prognostic capacities of a marker by taking into account confounding factors. Manuscript submitted.

Examples

 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
# import and attach the data example

data(dataDIVAT)

# A subgroup analysis to reduce the time needed for this exemple

dataDIVAT <- dataDIVAT[1:400,]

# The ROC curve to evaluate the crude capacities of the recipient age for the
# prognosis of post kidney transplant mortality (we ignore the censoring process)

roc1 <- adjusted.ROC(status="death", variable="ageR", confounders=~1,
database=dataDIVAT, precision=seq(0.1,0.9, by=0.1) )

# The standardized and weighted ROC curve to evaluate the capacities
# of the recipient age for the prognosis of post kidney transplant
# mortality by taking into account the donor age and the recipient
# gender (we ignore the censoring process).

# 1. Standardize the marker according to the covariates among the controls
lm1 <- lm(ageR ~ ageD + sexeR, data=dataDIVAT[dataDIVAT$death == 0,])
dataDIVAT$ageR_std <- (dataDIVAT$ageR - (lm1$coef[1] + lm1$coef[2] *
 dataDIVAT$ageD + lm1$coef[3] * dataDIVAT$sexeR)) / sd(lm1$residuals)

# 2. Compute the sensitivity and specificity from the proposed IPW estimators
roc2 <- adjusted.ROC(status="death", variable="ageR_std",
 confounders=~bs(ageD, df=3) + sexeR, database=dataDIVAT, precision=seq(0.1,0.9, by=0.1))

# The corresponding ROC graph
plot(1-roc1$table$sp, roc1$table$se, ylim=c(0,1), xlim=c(0,1), ylab="sensitivity",
xlab="1-specificity", type="l", lty=1, col=1, lwd=2)
lines(1-roc2$table$sp, roc2$table$se, col=2, lwd=2, lty=2)
abline(c(0,0), c(1,1), lty=2)
legend("bottomright", lty=1:2, lwd=2, col=1:2, c(paste("Crude estimation,
 (AUC=", round(roc1$auc, 2), ")", sep=""),paste("Adjusted estimation,
 (AUC=", round(roc2$auc, 2), ")", sep="") ) )

ROCt documentation built on May 2, 2019, 3:25 p.m.