Hello Everyone,
I have a situation with respect to my data. I have weekly data from the top 200 songs streamed in Spotify for a total of 47 countries per week. So at the end when I append the 47 countries in one file to obtain a single file I get the following situation:
id artist country date
1 a x w1
1 a y w1
1 a z w1
1 a xx w1
2 b x w1
2 b y w1
2 b z w1
2 b xx w1
And so forth for the period of two years. So basically what I have is the same id in the same country repeated n times depending on how many songs they have in that country in that week, repeated around 47 countries for a total of 104 weeks. So basically I don't know how to set up the data for a xtset or a tsset, or if even doing that is necessary. Besides that, I tried to collapse the data so to have the percentages of how many times by country they are names but still I have the problem that the id ends up repeated through the different dates.
Any pieces of advice?
Cordially,
Ramadan Aly
Related Posts with Advice regarding panel data and collapse
Stratified sample with probability proportional to sizeWe have a total of 908 communities (each community has a number of households) which are located in …
Reshape numerous variablesI have a vector of numerous variables (>100) that I need to reshape. Basically the format of the …
Arranging bars of graph barHello community. I am producing a graph with Stata. Here is the output : Array And here is the code …
Invalid Syntax while loopinghello, i dont know why stata keeps me showing invalid syntax in this loop: foreach x of p524a1_14 p…
Survival Analysis - different outputsHello everyone, I am trying to do survival analysis on 2018 Nigeria Demographic and Health Survey D…
Subscribe to:
Post Comments (Atom)
0 Response to Advice regarding panel data and collapse
Post a Comment