Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6729755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:19:40+00:00 2026-05-26T10:19:40+00:00

I am plotting ROCs and measuring partial AUC as a metric of ecological niche

  • 0

I am plotting ROCs and measuring partial AUC as a metric of ecological niche model quality. As I am working in R, I am using the ROCR and the pROC packages. I’ll settle on one to use, but for now, I just wanted to see how they performed, and if one met my needs better.

One thing that confuses me is that, when plotting a ROC, the axes are as follows:

ROCR

x axis: 'true positive rate' 0 -> 1
y axis: 'false positive rate', 0 -> 1

pROC

x axis: 'sensitivity' 0 -> 1
y axis: 'specificity' 1 -> 0. 

But if I plot the ROC using both methods, they look identical.
So I just want to confirm that:

true positive rate = sensitivity

false positive rate = 1 - specificity.

Here is a reproducible example:

obs<-rep(0:1, each=50)
pred<-c(runif(50,min=0,max=0.8),runif(50,min=0.3,max=0.6))
plot(roc(obs,pred))

ROCRpred<-prediction(pred,obs)
plot(performance(ROCRpred,'tpr','fpr'))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:19:41+00:00Added an answer on May 26, 2026 at 10:19 am

    To confirm, you are right in that true positive rate = sensitivity and false positive rate = 1 – specificity. In your example, the order in which you plot components of the ROCR performance object from the ROCR package is key. In the last line, the first performance measure, true positive rate, ‘tpr’ gets plotted on the y-axis measure = 'tpr' and the second performance measure, false positive rate, is plotted on the x-axis x.measure = 'fpr'

    plot(performance(ROCRpred, measure = 'tpr', x.measure = 'fpr'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When plotting color-maps using gnuplot, I usually use the following lines: ... set palette
I'm plotting data in Python using matplotlib. I am updating the data of the
I am plotting an array of pie charts, each using the same two colors
When using the d3 plotting library Rickshaw the renderer (either area, line, or bar)
I am plotting a continuous variable against a factor using plot() in R (see
I'm plotting a TimeTableXYDataset using a StackedXYBarRenderer . Unfortunately the colours of each series
I've been working on a computational physics project (plotting related rates of chemical reactants
I'm using rpy2 to do data analysis and plotting in python. It works fine
When plotting multiple data series using both line specification ( X , Y ,
Hi i'm plotting columnseries graph using chart controls by downloading Microsoft wpftoolkit. I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.