Good evening,
I have a .dta file with this variables: Date, Time, event, ....other variables....
The variable event assumes value=1 for the whole duration of the event otherwise assumes value =.
The .dta file could have more than 1 event.
I want to keep the event and a temporal window of 10 minutes before and 10 minutes after the event.
In the picture there is an example of the data, I want to keep the event (when the variable event=1), and the observations 10 minutes before the start of the event (line 17467) and 10 minutes after the end of the event (line 17471) and drop the other observations.
Thanks to all
I have a .dta file with this variables: Date, Time, event, ....other variables....
The variable event assumes value=1 for the whole duration of the event otherwise assumes value =.
The .dta file could have more than 1 event.
I want to keep the event and a temporal window of 10 minutes before and 10 minutes after the event.
In the picture there is an example of the data, I want to keep the event (when the variable event=1), and the observations 10 minutes before the start of the event (line 17467) and 10 minutes after the end of the event (line 17471) and drop the other observations.
Thanks to all
Comment