I am working with panel data by year. I would like to drop all observations (years) within a panel after an indicator variable has a value of 1. Can anyone suggest code for this? To illustrate: I have observations for each country over a certain time period. At some point in the time period for some of the countries, an indicator variable turns to a value of 1. I want to drop all the years for each country after the indicator variable turns to 1 (so that the country 'exits' the data), only for those countries where the indicator goes to 1 (all other country-observations should stay in the data).
-
Login or Register
- Log in with
Comment