# 2 roc curves (from a study with 2 biomarkers) in one curve

#### raluca

##### New Member
Hy, I have a problem about solving something in R. It's about 2 roc curves of a 2 biomarkers... and I have to plot it in one curve and calculate the AUC under the roc curve without using logistic regression. Exist a package in R to do that? How cand I solve it?
This is what i done, plotting that 2 biomarkes in two curves:

## Read in the data ##

## Install and load ROCR package ##
install.packages("ROCR")
library(ROCR)

## Plot the ROC curve for CA199 ##
pred_pancr <- prediction(pancr$CA199,pancr$d)
perf_pancr <- performance(pred_pancr,"tpr","fpr")
plot(perf_pancr)

##AUC under the ROC curve for CA199 ##
performance(pred_pancr,"auc")

## Plot the ROC curve for C125 in the same panel plot ##
pred_pancr1 <- prediction(pancr$CA125,pancr$d)
perf_pancr1 <- performance(pred_pancr1,"tpr","fpr")

##AUC under the ROC curve for CA125 ##
performance(pred_pancr1,"auc")

## Add the refference line ##
abline(0, 1, lty=2, col='red')

#### hlsmith

##### Omega Contributor
Your wording is poor. So you want to plot an ROC curve for a single Biomarker in a figure. Then also plot another ROC curve for another single biomarker in the same figure?

Is this correct?

#### raluca

##### New Member
I want to calculate the area under both curves, but not separately, i want to prove that the AUC1, AUC2 < AUC3("AUC1+AUC2"). Combining diagnostic test results to increase accuracy but without using logistic regression.

#### hlsmith

##### Omega Contributor
For clarification, examine both marker at once or using markers serially?

So you would hypothesize: (AUC1 - 0.5) + (AUC2 - 0.5) < AUC3 - 0.5

Just a heads up, I would wonder if that would mean there is an interaction between them or they are totally independent of each other. If there is not an interaction and they are slightly correlated it seems like something that would be hard to distinguish.

So you could do this very easily in SAS using logistic and a post-test to compare the models. But you don't what to do this. So you will need to calculate the first two values with standard errors and pool them. Then calculate the second, which I am a little unsure on it you would just sum the values of the two biomarkers and calculate the AUC and SE or not.

Next you would compare the first composite to the second. Though I am not sure if you need to control for the correlation of the two groups?