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
I created a YouTube video on using CODE delimiters & dataex – looking for feedback on making it betterHi everyone, It seems like using the CODE delimiters and -dataex- is a hurdle for new posters (part…
Difference between catplot and tabplotDear Stata users, I have a dataset comprised of two variables, the foobarx variable is what I conce…
Workshop on interpreting intetraction effectsWorkshop: Interpreting Interaction Effects with ICALC March 29-30, 2019 Philadelphia Instructor: Ro…
Predicting residuals of an EGARCH model for panel data using rangerun/rangestatHello Statalisters, My data is daily panel data that consists of 379 firms: Code: * Example gene…
How do I combine observations within a dataset?Hi all, I appended two datasets based on ID. I was not able to merge these datasets, because ID did…
Subscribe to:
Post Comments (Atom)
0 Response to Panel data format: varlist as IDs
Post a Comment