I want to decompose changes in fertility rate by compositional effect and rate effect using Das Gupta(1993) decomposition methods. Is there code or function for doing Das Gupta decomposition using R? For STATA I find out "rdecompose", but I could not find any code for R.
Asked
Active
Viewed 350 times
2 Answers
1
I wrote a small package with a set of function to do the Das Gupta decomposition for P factors, along with a script for simulating and seeing how you can use it for a data.table. It's definitely not optimized and if I have the time, I'm definitely planning to write the backend summations in C++. You can find the repo here https://github.com/sadatnfs/dgdecomp
1
There is another package DasGuptR
here https://github.com/josiahpjking/DasGuptR
DemoDecomp
gives other general approaches (Caswell 1989, Andreev et al 2002, Horiuchi et al 2008) that can also do the same thing https://github.com/timriffe/DemoDecomp

tim riffe
- 5,651
- 1
- 26
- 40