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
Error with clchi2 (clustered chi-squared test) commandHello, I am trying to assess the relationship between two categorical variables in a clustered data…
Combining regression results and then test for significanceHi Statalists, I have run a lot of regressions in this format: y1 = a1 + b1x1 + b2x2 + e y2 = a2 + …
npregress series: R2 value not availableHello everyone, I am using Stata 17, and trying out the example from the npregress series manual. .…
Catplot - plotting subcategories or subgroups along with main categoriesDear Statalisters I am using STATA 14.2 with the user written program catplot (ssc install catplot)…
Which count model to use?I have a dependent variable that ranges from 0-11, and it's the number of Covid-19 precautions the r…
Subscribe to:
Post Comments (Atom)
0 Response to Panel data format: varlist as IDs
Post a Comment