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
Related Posts with Panel data format: varlist as IDs
Coefplot colors across subgraphsHi, I would like to use coefplot to plot different regression results on the same graph. I would li…
Use Collapse and Reshape to arrange the dataDear Statalisters, I have a cross section dataset which contains information on household level fo…
How to generate a alphabetic macro list using stata?Hi guys, A crucial step in my programming is to generate a alphabetic macro list to locate the tabl…
Add stars to numbers based on p value recorded in a given variableDear list, I have two variables, A and B. I want to list A, and ask Stata to attach significance st…
Two-way line graphsI hope someone can help me as I have spent countless hours trying to recreate the graph output in jo…
Subscribe to:
Post Comments (Atom)
0 Response to Panel data format: varlist as IDs
Post a Comment