Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73242

Summary statistics excluding observations already used

$
0
0
Hi there,

I'm writing a research project about how profitability responds to a CEO pay cut. I therefore look at observations that have a pay cut (more than 25% decrease in pay cuy YoY) and take the 5 years before and 5 years after. I want to compare the mean of these observations with the observations without a pay cut. To calculate the observations with a pay cut, I use the following code:
Code:
bys globalcompanykey (datayearfiscal): gen PM_level_min5 = profitmargin[_n-5] if tdc2percentchangeyeartoyear[_n] < -25  & _n != 1 & profitmargin !=.
To calculate the normal observations, I use the following code:
Code:
bys globalcompanykey (datayearfiscal): gen PM_level_normal_min5 = profitmargin[_n-5] if tdc2percentchangeyeartoyear[_n] > -25 & _n != 1 & profitmargin !=.
I do this for _n - 5 until _n + 5. However, with the code above, I also take for the normal observations the observations until the pay cut and after pay cut. I would like to exclude the 5 years before a pay cut and 5 years after a pay cut from the second code. How can I do this?

Thanks.

Viewing all articles
Browse latest Browse all 73242

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>