Dear Statalisters,
I can't find a solution to a rather simple problem. I have got balanced panel data. id is the company identifier, and I have got 100 companies (id=1,2,...,100). Date ranges from 01/01/2000 to 12/31/2012 for each id. Another important variable is ma (number of media articles) that takes values 0, 1, 2, ... , 45. Finally, Vit is a continuous variable.
If ma is different from zero (i.e. ma > 0), then this is an event day (t=0). I want to calculate the average Vit over the non-event period t-60 to t-10 and t+10 to t+60, relative to event day t=0.
In other words, when ma>0, I want to calculate the average value of Vit for the period t-60 to t-10 and t+10 to t+60. Of course I want to do this by id.
I would appreciate your help.
Thank you in advance.
I can't find a solution to a rather simple problem. I have got balanced panel data. id is the company identifier, and I have got 100 companies (id=1,2,...,100). Date ranges from 01/01/2000 to 12/31/2012 for each id. Another important variable is ma (number of media articles) that takes values 0, 1, 2, ... , 45. Finally, Vit is a continuous variable.
If ma is different from zero (i.e. ma > 0), then this is an event day (t=0). I want to calculate the average Vit over the non-event period t-60 to t-10 and t+10 to t+60, relative to event day t=0.
In other words, when ma>0, I want to calculate the average value of Vit for the period t-60 to t-10 and t+10 to t+60. Of course I want to do this by id.
I would appreciate your help.
Thank you in advance.
Comment