I run a lot of logistic regression models at work. At my previous job, where I used Minitab, I always saw stats on Concordant Pairs, Discordant Pairs, and Ties in the model summary output for Logistic Regression modelling. I tried to look for a function that gives you the same stats for a logistic regression model in R, but wasn’t successful. So, I decided to write my own:

An example of the output from this function follows:

> Concordance(GLM.3)

$concordance

[1] 0.6798001

$num_concordant

[1] 2312

$discordance

[1] 0.3201999

$num_discordant

[1] 1089

$tie_rate

[1] 0

$num_tied

[1] 0

You can see from the above stats that the model I evaluated with the concordance function had a concordance rate of 68%, and a discordance of 32%. So, seemingly evidence of a good model!

### Like this:

Like Loading...

*Related*

Please share your calculations/Code in R.

Thanks for your comment. I think the link to github got broken after I moved my blog to WordPress (I can’t remember what the original host was now!!)

I didn’t understand why have you considered code to equate the length of the event and non-event tables.

I run your code but answer from your code didn’t match with SAS output.

Code in below post gives ans. simillar to SAS.

http://statour.blogspot.in/2012/12/concordance-and-discordance-in-logistic.html

(# Inspiration from github code 🙂 )