Hi everyone
I'm currently working on a project, where my analysis will consist of an event study.
I have a dataset where individuals are observed over af 18 years period, but every individual is not necessarily observed in each year.
Essentially, I want to construct a sample where each individual is observed five years prior to the event (eventtime = 0) and 10 years after. But in order to avoid that the sample gets too small, I want to keep individuals who are observed at least 8 times over the 15-years period, and at least 1 time before the event and 1 time after.
For now, I have an event-time variable, which have values from -17 to +17 where the value "eventtime=0" is the year the event of interest happens.
Is there anyone who has a suggestion for a code, that can create the sample with the above-mentioned criteria?
Thank you in advanced.
I'm currently working on a project, where my analysis will consist of an event study.
I have a dataset where individuals are observed over af 18 years period, but every individual is not necessarily observed in each year.
Essentially, I want to construct a sample where each individual is observed five years prior to the event (eventtime = 0) and 10 years after. But in order to avoid that the sample gets too small, I want to keep individuals who are observed at least 8 times over the 15-years period, and at least 1 time before the event and 1 time after.
For now, I have an event-time variable, which have values from -17 to +17 where the value "eventtime=0" is the year the event of interest happens.
Is there anyone who has a suggestion for a code, that can create the sample with the above-mentioned criteria?
Thank you in advanced.
Comment