Entering edit mode
19 months ago
seta
★
1.9k
Dear all,
I used the pROC library in R for ROC analysis. My response variable is binary and my independent variable is categorical as 0, 1, 2. As the output of the analysis, I obtained the ROC curve figure, but it looks a bit strange, does not? Why the corresponding line did not start from 0, is it usual or something is wrong?
Thanks for sharing your comments!
Do you have a low sample number?
Hi Kevin,
No, the sample size is about 12000, of which 35% of them are cases. Based on tutorials I've read, I used 80% of the samples for the training dataset and the rest of them for the test dataset. Also, the rate of the response variable is similar in both datasets. In fact, my independent variable is an SNP that I converted to 0, 1, 2 based on the number of effect allele, is it may be the issue or something else?
Oh, I see. We would sometimes see this plot if the dataset was very small (~3 samples), but your dataset is actually large but has some other issue - the fact that you have a binary outcome and an independent variables with just 3 levels is telling. Diagnosing the problem is difficult from here without seeing the input and output of every step. Can you share the code for the ROC curve and also the model fitting (
glm()
)?Here is the code I used:
Is there any problem?
Thanks
I don't immediately see anything wrong. The unusual curve is probably just due to the fact that everything is categorical and that there are only 5 levels across the outcome and independent variables in total.