Hi Statalist,

I am working on air pollution alert data and wondering how to make dummies (or replace the alert variable with one) for the alert in the following days. There is an issue date of an alert and sometimes the alert lasts more than a single day, usually up to seven days. I know its issue date and release date and want to change the alert variable to one until the release date. They may have different lengths of alert days and here is an example data table:

issue_date release_date pollutant alert
19jul2018 21jul2018 1 1
20jul2018 . . .
21jul2018 . . .
22jul2018 . . .

Thank you very much for your help in advance!!