research institute for compassionate economics

model Stata do file for demographic decomposition papers

Written by Dean Spears on November 28th, 2015
  • Topics:

Diane and I just finished teaching a weeklong workshop at the Indian Statistical Institute in Delhi, where we taught about how to write empirical papers using demographic datasets in Stata.  In particular, we focused on demographic decomposition techniques as a transparent way to write about interesting and important empirical facts.  This sort of paper embraces paradoxes, puzzles, and otherwise messy correlations.

As part of the course, I made this model do file that collected what the class learned.  In case it is of use to you, I thought to post it here online.  You can modify the program to help write your own decomposition paper.

The do file made the graph included with this blog post.  The motivating example is to use Bangladeshi DHS data to ask how much of the difference in average child height between rural and urban Bangladesh can be accounted for by differences in mothers’ education.