Hello stata users,
I am working with cross-country industry-level panel data and I am trying to make a regression of variable "jcr" & "jdr" on growth across different quantile groups.
My dataset looks like:
I would like to generate a regress jcr and jdr on growth across quantile groups (in one regression).
I would preferably use -reghdfe- with weighting (w = LP_sum_w) in the code like reghdge [aw=w], with absorb vce(cluster ...) options for country*industry*year fixed effects.
But the problem is I am unsure how to perform this regression since xtset country year is not working as there are multiple observations for each country industry year as well.
Maybe my question is unclear but hope someone could help me with this issue, please!
Thanks!
I am working with cross-country industry-level panel data and I am trying to make a regression of variable "jcr" & "jdr" on growth across different quantile groups.
My dataset looks like:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str3 country int year byte ind double growth byte quantile float(jcr jdr) "A" 2002 3 .672191858291626 1 -.1229408 -.2389851 "A" 2002 3 .13869287073612213 2 -.033738595 -.11796902 "A" 2002 3 .022968925535678864 3 .004111842 -.05286625 "A" 2002 3 .0017980386037379503 4 -.011298022 -.06083192 "A" 2002 3 -.16667737066745758 5 .068663485 -.013689965 "A" 2002 3 -.17840731143951416 6 -.006880734 -.15333694 "A" 2003 3 .7250598669052124 1 -.2283749 -.3857791 "A" 2003 3 .1564776450395584 2 -.018166976 -.09158104 "A" 2003 3 .051283758133649826 3 -.05724212 -.09636812 "A" 2003 3 .023065701127052307 4 -.0402614 -.06571764 "A" 2003 3 -.20438718795776367 5 .0044542346 -.05645589 "A" 2003 3 -.36091873049736023 6 .016714025 -.0307614 "A" 2004 3 .5813043117523193 1 -.29487726 -.3380778 "A" 2004 3 .1335824579000473 2 .0070048 -.06939671 "A" 2004 3 .07415185123682022 3 -.029579455 -.0826437 "A" 2004 3 .04221270605921745 4 -.04617803 -.08350244 "A" 2004 3 -.12049635499715805 5 .044223 -.028452955 "A" 2004 3 .7893650531768799 6 .23076923 -.12546878 "A" 2005 3 .7710216641426086 1 -.10427842 -.2658622 "A" 2005 3 .1161515936255455 2 -.10758134 -.16785954 "A" 2005 3 .027848316356539726 3 .031212064 -.03418614 "A" 2005 3 -.01820971444249153 4 -.001233272 -.04062689 "A" 2005 3 -.18122969567775726 5 .01013001 -.04751295 "A" 2005 3 . 6 .01120852 -.04151956 "A" 2006 3 .39854076504707336 1 .02969432 -.16627036 "A" 2006 3 .08353615552186966 2 -.04770102 -.10662634 "A" 2006 3 .027338284999132156 3 -.0021104466 -.07062218 "A" 2006 3 -.025064121931791306 4 .008168118 -.03237979 "A" 2006 3 -.19563138484954834 5 .007862739 -.0444931 "A" 2006 3 . 6 -.02727273 -.06576048 "A" 2007 3 .2896402180194855 1 .0016892842 -.0936298 "A" 2007 3 -.010519917123019695 2 -.06810414 -.11413156 "A" 2007 3 -.09132310748100281 3 -.04691949 -.1015541 "A" 2007 3 -.152311772108078 4 .016302703 -.035093993 "A" 2007 3 -.1548743098974228 5 -.03119042 -.0533259 "A" 2007 3 . 6 -.27761194 -.2806777 "A" 2008 3 .4056224822998047 1 -.0411319 -.1085815 "A" 2008 3 .02111530490219593 2 -.010045745 -.07682251 "A" 2008 3 -.03370849788188934 3 -.04762908 -.0966561 "A" 2008 3 -.05902251601219177 4 -.034295693 -.06143871 "A" 2008 3 -.23769980669021606 5 -.035204045 -.04672369 "A" 2008 3 . 6 -.072829135 -.1020152 "A" 2009 3 .5678138732910156 1 -.191908 -.2166389 "A" 2009 3 .02235862798988819 2 -.0951769 -.13724859 "A" 2009 3 .004819469526410103 3 -.1038592 -.13945746 "A" 2009 3 -.07165567576885223 4 -.01909801 -.05106484 "A" 2009 3 -.1486140936613083 5 -.04328514 -.05875266 "A" 2009 3 . 6 -.17534094 -.22955263 "A" 2010 3 .3793466091156006 1 -.19918746 -.22900696 "A" 2010 3 -.06447786837816238 2 -.08834474 -.14494775 "A" 2010 3 -.13184867799282074 3 -.06881586 -.12275226 "A" 2010 3 -.1692247837781906 4 -.015930763 -.05490859 "A" 2010 3 -.2831023931503296 5 -.015777078 -.03964461 "A" 2010 3 . 6 .0885202 -.14853851 "A" 2011 3 .5959907174110413 1 -.3571327 -.3936089 "A" 2011 3 .011601963080465794 2 -.14843367 -.18707436 "A" 2011 3 -.051778193563222885 3 .028758563 -.06055511 "A" 2011 3 -.10236292332410812 4 -.00695848 -.04402136 "A" 2011 3 -.20277179777622223 5 -.0022399058 -.04195277 "A" 2011 3 . 6 -.034061827 -.1164549 "A" 2012 3 .7737371325492859 1 -.1421047 -.2277383 "A" 2012 3 .20508399605751038 2 -.06518236 -.12053429 "A" 2012 3 .01851370744407177 3 -.06133205 -.12030085 "A" 2012 3 -.005175860598683357 4 -.033680763 -.067842 "A" 2012 3 -.166717529296875 5 -.0021038372 -.06958006 "A" 2012 3 . 6 -.305692 -.3566578 "A" 2013 3 .7758398652076721 1 -.214703 -.27317035 "A" 2013 3 .12453848123550415 2 -.05056649 -.0967647 "A" 2013 3 .0033996901474893093 3 .03965649 -.066506475 "A" 2013 3 .004305284004658461 4 -.01898581 -.06434934 "A" 2013 3 -.07516103982925415 5 -.022770027 -.04234344 "A" 2013 3 . 6 .010594276 -.06073594 "A" 2014 3 .8845993280410767 1 -.127823 -.1997209 "A" 2014 3 .10411844402551651 2 -.0556562 -.12020043 "A" 2014 3 .08039402961730957 3 -.05245333 -.12238398 "A" 2014 3 .030378490686416626 4 .006042691 -.05860734 "A" 2014 3 -.1739516258239746 5 -.01096147 -.0391375 "A" 2014 3 . 6 .10652217 -.1263277 "A" 2015 3 .6916394233703613 1 -.1605144 -.24799043 "A" 2015 3 .1250390261411667 2 -.04474998 -.10783525 "A" 2015 3 .031132899224758148 3 .0011184321 -.07011509 "A" 2015 3 .031201032921671867 4 .0431358 -.02584259 "A" 2015 3 -.1113152801990509 5 .01262757 -.019299036 "A" 2015 3 . 6 -.5246286 -.5481781 "A" 2016 3 .6162927150726318 1 -.19741857 -.28648126 "A" 2016 3 .09826809167861938 2 -.05692242 -.10655385 "A" 2016 3 .010408439673483372 3 -.0040609976 -.06685121 "A" 2016 3 -.034870076924562454 4 -.016038928 -.05093071 "A" 2016 3 -.17934803664684296 5 .014396247 -.02446498 "A" 2016 3 . 6 -.10151955 -.1657626 "A" 2017 3 .5765115022659302 1 -.2072452 -.3230486 "A" 2017 3 .10422269999980927 2 -.06889203 -.11480728 "A" 2017 3 -.010332309640944004 3 -.01343173 -.062518075 "A" 2017 3 .010408302769064903 4 .0039381958 -.03178757 "A" 2017 3 -.19977127015590668 5 .021094946 -.017537108 "A" 2017 3 . 6 -.016029337 -.06462012 "A" 2018 3 .6575387120246887 1 -.23188405 -.3012422 "A" 2018 3 .10164050757884979 2 -.11843801 -.1689077 "A" 2018 3 .05479102581739426 3 -.008364083 -.06457564 "A" 2018 3 .004252022132277489 4 -.06862622 -.11158565 end label values ind ind_labels label def ind_label 3 "M", modify label values quantile quantilelabels label def quantilelabels 1 "0-10", modify label def quantilelabels 2 "10-40", modify label def quantilelabels 3 "40-60", modify label def quantilelabels 4 "60-90", modify label def quantilelabels 5 "90-100", modify label def quantilelabels 6 "Unknown", modify
I would like to generate a regress jcr and jdr on growth across quantile groups (in one regression).
I would preferably use -reghdfe- with weighting (w = LP_sum_w) in the code like reghdge [aw=w], with absorb vce(cluster ...) options for country*industry*year fixed effects.
But the problem is I am unsure how to perform this regression since xtset country year is not working as there are multiple observations for each country industry year as well.
Maybe my question is unclear but hope someone could help me with this issue, please!
Thanks!
Comment