This method has recently been implemented in Stata by Jann (2006), and it is used here to decompose the differences in union membership over time and between western and eastern Germany.
exploredata-ZA3762_VarV670 exploredata-ZA2140_VarV3