New Stata command: bhatt

I’ve just uploaded a new Stata command to the SSC archive, bhatt.  The command calculated the Bhattacharyya Coefficient and Bhattacharyya Distance measures of overlap in two distributions.  Very cool.  Install from with Stata with the command net install bhatt.
bhatt calculates the Bhattacharyya Coefficient (BC) and Bhattacharyya Distance (BD) for comparing the degree of overlap between two distributions (see Bhattacharyya 1943). The Bhattacharyya Coefficient divides the overall distribution into a number of bins, and compares the proportion of each group within each bin. It ranges from 0 to 1, where 0 indicates no overlap between the two group distributions and 1 indicates complete overlap. The Bhattacharyya Distance is a natural log transformation of BC.

For N bins, the formulae for BC and BD are given as:

BCBD

where and q are the proportion of each group in bin i.

For full details of the measure, see: Bhattacharyya, A. (1943) ‘On a measure of divergence between two statistical populations defined by their probability distributions’ Bulletin of the Calcutta Mathematical Society, 35: 99-109.

 

 

 

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