Hello everyone, I am a new user on Stata and I need some help with the first replication study I am doing for my PhD.

I need to replicate a study on the effect of R&D expenditures on CEO compensations made by Cheng and published in 2004, but I am having troubles in dropping CEO compensation observations when the CEO for the same firm changes. More in depth, Cheng structured the dependent variable of his regression (CEO compensation) as the difference in the ln(CEO compensation)t - ln(CEO compensation)t-1 but does not calculate this delta when CEOs change across t and t-1 within the same firm, i.e. when there has been a CEO turnover.

How can I get rid of the latter observations in Stata?

Thank you,
Giovanni