BookmarkSubscribeRSS Feed
Ujjawal
Quartz | Level 8

I am confused between these two terms - Sensitivity and Concordance. What i understand about these two terms -

Concordance - the number of pairs where actual 1s have higher predicted probability of becoming 1s than 0s divided by total number of pairs

Sensitivity (True Positive) - percentage of 1s correctly predicted as 1. By their definitions, both seems to be the same.

I have read somewhere Concordance = (TRUE POSITIVE + TRUE NEGATIVE) / SAMPLE SIZE. I have tried to calculate concordance using this formula. But it seems to be incorrect.

First, i have run logistic regression using PROC LOGISTIC with CTABLE PPROB=0.5 options. Then, i have calculated true positive pairs from (Sensitivity percentage* number of 1s) and true negative pairs from (Specificity percentage * number of 0s). I added them up and divided by total responses. It is not matching up with concordance score.

2 REPLIES 2
Quentin
Super User

Hi,

I think you have two different definitions of concordance.

If I heard "concordance" in a diagnostic setting or predictive setting, I would first think of your second definition (TRUE POSTIVE + TRUE NEGATIVE) / SAMPLE SIZE.

Sensitivity is (True Positive)/(True Positive + False Negative).

There are lost of good pages on sensitivity/specificity/PPV/NPV etc.  Wikipedia has a nice 2x2 contingency table which describes different statistics.http://en.wikipedia.org/wiki/Sensitivity_and_specificity

But it looks like proc logistic is giving you something else for CONCORDANCE.  It is not %agreement using sample size as the denominator.  This site has a nice explanation.

http://www.ats.ucla.edu/stat/sas/output/sas_logit_output.htm

Note the denominator used by this calculation is not the sample size, it's the number of pairs.

Below is sample data.

Concordance of the contingency table is (TP+TN)/SIZE = (40+50)/100= 90%.

The concordance calculated by LOGISTIC is 80.8%.  The denominator for that calculation is 2475, i.e. with 45 true negatives and 55 true positive, you can have 2475 pairs.

data a;
   input x y weight;
   cards;
0 0 40
0 1 5
1 1 50
1 0 5
;
run;

proc logistic data=a descending;
  class x;
  model y=x;
  freq weight;
run;

proc freq data=a ;
  tables x*y /measures;
  weight weight;
run;

HTH,

--Q.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
stat_sas
Ammonite | Level 13

Hi,

Why are you using PPROB=0.5 in PROC LOGISTIC options? Why not 0.4,0.3 or some other value?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 6107 views
  • 0 likes
  • 3 in conversation