Hello Statalisters,
I have the following daily data shape:
date day city_1_price_A ... city_70_price_A city_1_price_B ... city_70_price_B Crude1 Crude2 avg_price_A avg_price_B
04jun2007 monday 115.4 ... 115.4 114.4 ... 113.9 44.05 47.20 112.51 103.88
05jun2007 tuesday 115.4 ... 115.4 114.4 ... 113.4 43.90 47.73 112.02 105.59
06jun2007 wednesday 115.4 ... 115.4 114.4 ... 113.4 43.89 47.57 111.69 104.68
where the variables city_[i]_price_A and city_[i]_price_B correspond to the average daily gas price before and after taxes and margins for the city i; Crude[i] is the daily price of crude i; and where avg_price_A is the daily average of city_1_price_A through city_70_price_A.
I am trying to reshape my data so it becomes compatible with the command xtset. I tried using reshape long, but it does not work as I do not have a common price_A variable for all cities, but instead a price variable for each city. In the same vein, I do not have an ID variable specific to each city. Could any of you give me an advice? Thank you! Julien
0 Response to Panel data format: varlist as IDs
Post a Comment