beta.div.comp function

Decompose D in replacement and richness difference components