I would like to generate a table which shows share of number of firms (percentage of number of firms) within each subgroups (it's a panel data).
Table that I want is share of number of firms within digital intensity (1 or 2) by each year.
For example, in 2006, there are 0.56 percentage of firms which is digital_intensity == 1.
Below is the example of my dataset.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte sector_code int(year id_num) float digital_intensity 49 2011 1 2 49 2012 1 2 49 2013 1 2 49 2015 1 2 49 2016 1 2 49 2017 1 2 49 2018 1 2 10 2008 2 2 10 2009 2 2 10 2010 2 2 10 2011 2 2 10 2012 2 2 10 2013 2 2 10 2014 2 2 10 2015 2 2 10 2016 2 2 10 2017 2 2 10 2018 2 2 16 2016 7 . 16 2017 7 . 16 2018 7 . 95 2013 8 1 95 2015 8 1 95 2016 8 1 95 2017 8 1 95 2018 8 1 90 2016 14 . 90 2017 14 . 90 2018 14 . 81 2016 20 1 81 2017 20 1 81 2018 20 1 79 2017 23 1 79 2018 23 1 58 2016 31 . 58 2017 31 . 10 2012 34 2 10 2014 34 2 10 2015 34 2 62 2014 35 1 62 2015 35 1 62 2016 35 1 62 2017 35 1 62 2018 35 1 49 2007 41 2 49 2008 41 2 49 2012 41 2 49 2016 46 2 49 2017 46 2 49 2018 46 2 93 2017 49 . 45 2016 53 . 45 2018 53 . 62 2016 56 1 62 2018 56 1 68 2017 57 2 68 2018 57 2 77 2016 59 1 77 2017 59 1 77 2018 59 1 62 2017 71 1 62 2018 71 1 10 2007 79 2 10 2008 79 2 10 2016 79 2 10 2017 79 2 10 2018 79 2 52 2016 83 2 52 2017 83 2 52 2018 83 2 86 2016 85 . 86 2017 85 . 86 2018 85 . 10 2016 86 2 68 2016 88 2 68 2017 88 2 68 2018 88 2 86 2016 91 . 86 2017 91 . 86 2018 91 . 86 2018 92 . 23 2006 96 . 23 2007 96 . 16 2011 97 . 16 2012 97 . 16 2013 97 . 16 2014 97 . 16 2015 97 . 16 2016 97 . 79 2007 101 1 79 2008 101 1 33 2016 103 . 33 2017 103 . 33 2018 103 . 95 2007 105 1 95 2011 105 1 95 2013 105 1 95 2016 105 1 95 2017 105 1 95 2018 105 1 end label values digital_intensity digital_intensity label def digital_intensity 1 "High_digital_intensity", modify label def digital_intensity 2 "Low_digital_intensity", modify
Could someone help me generate a table that I want ??
Thanks in advance,
Anne claire
0 Response to Generate share of number of firms in panel data
Post a Comment