Logistic Regression in R: Concordance and Discordance Testing

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!

Advertisements

3 thoughts on “Logistic Regression in R: Concordance and Discordance Testing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s