Hi everyone,

I am looking to create a dummy variable based on another dummy variable for an identifier set.

I have a dummy called death which equals 1 if a CEO of any company died in a particular year and 0 otherwise. Now I wanted to create another dummy which will be equal to 1 for all the years for that company if a CEO died anytime inside the dataset and 0 if no CEO of that company died during the time period. Can anyone help me with the proper coding for that?

Thanks in advance