Hello all,
I'm new to Stata and to the forum.
I am trying to replicate the method of DeAngelo, DeAngelo and Stulz (2010) with regard to their definition of 'excess cash'. Khieu and Pyles (2012) describe the method as:
'For each sample period, firms are first sorted into three equal-size groups based on total book assets and then three equal-size groups based on the market-to-book ratio. Each observation is then put into one of the nine cross-sectional groups and the median cash level (divided by total noncash assets) of each two-digit SIC industry represents the normal level of cash for each firm within the group for that period. Excess cash is then calculated as actual cash holdings minus this median cash level. We label this variable Excess Cash DDS .'
I have managed to allocate each observation a group for each year as described using the egen, xtile and group commands. I cannot however find a way to progress this to the median cash level for each SIC code without getting a stream of data that would be incredibly labour intensive to assign back to each observation.
What I am looking to achieve is a variable displaying this 'median cash level'. I hope that someone can help!
Best,
Ryan
I'm new to Stata and to the forum.
I am trying to replicate the method of DeAngelo, DeAngelo and Stulz (2010) with regard to their definition of 'excess cash'. Khieu and Pyles (2012) describe the method as:
'For each sample period, firms are first sorted into three equal-size groups based on total book assets and then three equal-size groups based on the market-to-book ratio. Each observation is then put into one of the nine cross-sectional groups and the median cash level (divided by total noncash assets) of each two-digit SIC industry represents the normal level of cash for each firm within the group for that period. Excess cash is then calculated as actual cash holdings minus this median cash level. We label this variable Excess Cash DDS .'
I have managed to allocate each observation a group for each year as described using the egen, xtile and group commands. I cannot however find a way to progress this to the median cash level for each SIC code without getting a stream of data that would be incredibly labour intensive to assign back to each observation.
What I am looking to achieve is a variable displaying this 'median cash level'. I hope that someone can help!
Best,
Ryan
Comment