Hello!
I have read a few posts about Blau's diversity index but am not quite sure if my approach is correct now. On the righthand side of my output, you see the Blau Diversity Index I created by using this code (regarding the degree_dummy: e.g. 1 = Bachelor, 2 = Master, ...). Am I on the right track or am I missing something?
bysort gvkey fyear: divcat degree_dummy, gv gen_gv(H_degree)
* Example generated by -dataex-. For more info, type help dataex
clear
input long gvkey int fyear float(degree_dummy H_degree)
1 2005 1 .32
1 2005 2 .32
1 2005 2 .32
1 2005 2 .32
1 2005 2 .32
1 2006 1 .32
1 2006 2 .32
1 2006 2 .32
1 2006 2 .32
1 2006 2 .32
1 2007 0 .56
1 2007 1 .56
1 2007 2 .56
1 2007 2 .56
1 2007 2 .56
2 2015 1 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2016 0 .3703704
2 2016 1 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
3 2005 0 .53125
3 2005 0 .53125
3 2005 0 .53125
3 2005 0 .53125
3 2005 0 .53125
3 2005 1 .53125
3 2005 1 .53125
3 2005 2 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 1 .53125
3 2006 1 .53125
3 2006 2 .53125
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 1 .4938272
3 2007 1 .4938272
3 2007 2 .4938272
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 1 .5925926
3 2008 1 .5925926
3 2008 2 .5925926
3 2008 2 .5925926
3 2009 0 .59375
3 2009 0 .59375
3 2009 0 .59375
3 2009 0 .59375
3 2009 1 .59375
3 2009 2 .59375
3 2009 2 .59375
3 2009 2 .59375
3 2010 0 .4897959
3 2010 0 .4897959
3 2010 0 .4897959
3 2010 0 .4897959
3 2010 2 .4897959
3 2010 2 .4897959
3 2010 2 .4897959
3 2011 0 .5
3 2011 0 .5
3 2011 0 .5
3 2011 0 .5
3 2011 0 .5
3 2011 2 .5
3 2011 2 .5
3 2011 2 .5
3 2011 2 .5
3 2011 2 .5
3 2012 0 .5
3 2012 0 .5
3 2012 0 .5
3 2012 0 .5
end
Thank you very much in advance!
I have read a few posts about Blau's diversity index but am not quite sure if my approach is correct now. On the righthand side of my output, you see the Blau Diversity Index I created by using this code (regarding the degree_dummy: e.g. 1 = Bachelor, 2 = Master, ...). Am I on the right track or am I missing something?
bysort gvkey fyear: divcat degree_dummy, gv gen_gv(H_degree)
* Example generated by -dataex-. For more info, type help dataex
clear
input long gvkey int fyear float(degree_dummy H_degree)
1 2005 1 .32
1 2005 2 .32
1 2005 2 .32
1 2005 2 .32
1 2005 2 .32
1 2006 1 .32
1 2006 2 .32
1 2006 2 .32
1 2006 2 .32
1 2006 2 .32
1 2007 0 .56
1 2007 1 .56
1 2007 2 .56
1 2007 2 .56
1 2007 2 .56
2 2015 1 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2015 2 .2777778
2 2016 0 .3703704
2 2016 1 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2016 2 .3703704
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
2 2017 2 0
3 2005 0 .53125
3 2005 0 .53125
3 2005 0 .53125
3 2005 0 .53125
3 2005 0 .53125
3 2005 1 .53125
3 2005 1 .53125
3 2005 2 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 0 .53125
3 2006 1 .53125
3 2006 1 .53125
3 2006 2 .53125
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 0 .4938272
3 2007 1 .4938272
3 2007 1 .4938272
3 2007 2 .4938272
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 0 .5925926
3 2008 1 .5925926
3 2008 1 .5925926
3 2008 2 .5925926
3 2008 2 .5925926
3 2009 0 .59375
3 2009 0 .59375
3 2009 0 .59375
3 2009 0 .59375
3 2009 1 .59375
3 2009 2 .59375
3 2009 2 .59375
3 2009 2 .59375
3 2010 0 .4897959
3 2010 0 .4897959
3 2010 0 .4897959
3 2010 0 .4897959
3 2010 2 .4897959
3 2010 2 .4897959
3 2010 2 .4897959
3 2011 0 .5
3 2011 0 .5
3 2011 0 .5
3 2011 0 .5
3 2011 0 .5
3 2011 2 .5
3 2011 2 .5
3 2011 2 .5
3 2011 2 .5
3 2011 2 .5
3 2012 0 .5
3 2012 0 .5
3 2012 0 .5
3 2012 0 .5
end
Thank you very much in advance!

Comment