I am working on a panel data with 31 provinces. Each with temperature data of year 1995, 2000, 2005, 2010 and 2015. Now I would like to adjust the temperatures according to the temperature in year 1995 for each province: Temp 1995 - Temp 1995 (=0), Temp 2000 - Temp 1995, Temp 2005 - Temp 1995 and so on.
I tried to do this by gen temp_1995=temp if year==1995 and then gen recentredtemp = temp - temp_1995. However, it turns out temp_1995 takes on missing value for year = 2000 and after. I want the temp_1995 = the temperature in 1995 even for year = 2000, 2005, 2010 and 2015. How can I do that?
I tried to do this by gen temp_1995=temp if year==1995 and then gen recentredtemp = temp - temp_1995. However, it turns out temp_1995 takes on missing value for year = 2000 and after. I want the temp_1995 = the temperature in 1995 even for year = 2000, 2005, 2010 and 2015. How can I do that?
Comment