Hi there,
I'm trying to get the profit margin of a certain company 1 year after and 1 year before a CEO pay cut (more than 25% cut in salary) has occurred. I have the following commands:
The command for the 1 year before ( _n-1) is working, but the command for the 1 year after gives me a "Weights not allowed" error.
Why is this the case and how can I fix it?
Thanks.
I'm trying to get the profit margin of a certain company 1 year after and 1 year before a CEO pay cut (more than 25% cut in salary) has occurred. I have the following commands:
Code:
bys globalcompanykey (datayearfiscal): gen PM_level_1 = profitmargin [_n+1] if salarypercentchangeyeartoyear[_n] < -25 & _n != 1 & profitmargin !=.
Code:
bys globalcompanykey (datayearfiscal): gen PM_level_min1 = profitmargin[_n-1] if salarypercentchangeyeartoyear[_n] < -25 & _n != 1 & profitmargin !=.
Why is this the case and how can I fix it?
Thanks.

Comment