Hi,
I have panel data and I am utilizing an event study approach. The problem is that some event windows are very close to each other and will overlap. For example, an event may happen for company X on Jan 1 and again on Jan 3. The event day for Jan 1 will thus be both 0 (time of event) and -2 (days before event), while it will be both 0 for Jan 3 and +2 (days after an event). If I want to look at 120 days before the event and 30 days after the event this becomes a problem as one row (observation) cannot have two event days.
I am thinking this can be solved by making an id variable for all the events, separating them, and then using the duplicate command with an if statement but I am struggling with it and not very used to the duplicate command.
Thanks in advance!
I have panel data and I am utilizing an event study approach. The problem is that some event windows are very close to each other and will overlap. For example, an event may happen for company X on Jan 1 and again on Jan 3. The event day for Jan 1 will thus be both 0 (time of event) and -2 (days before event), while it will be both 0 for Jan 3 and +2 (days after an event). If I want to look at 120 days before the event and 30 days after the event this becomes a problem as one row (observation) cannot have two event days.
I am thinking this can be solved by making an id variable for all the events, separating them, and then using the duplicate command with an if statement but I am struggling with it and not very used to the duplicate command.
Thanks in advance!
Comment