Hi, i want to create a dummy variable (group-wise). my data ranges between 2001 to 2010. Features of the dummy variables are below:
Condition 1. the dummy variable equals one if variable AQA value for firm i in year t is non-missing or non-zero
Condition 2. in condition 1, for example AQA value is non-zero in year 2004 for firm i, then i want dummy variable for firm i equals one from year 2004 to end year 2005, 2006, 2007, 2008, 2009, and 2010.