Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str9 id int year double x A 1978 .692 A 1979 .712 A 1980 .746 B 1978 .761 B 1979 .759 B 1980 .761 C 1978 1.107 C 1979 1.119 C 1980 1.181 end bys id: gen tem1 = x if year == 1980 bys id : egen tem2 = mean(tem1) gen wanted = x/tem2
0 Response to deflate data using 1980 value
Post a Comment