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
spmap command produces only a fraction of the intended mapHello! I'm trying to draw a map that shows proportion of households in a state that report a migrant…
Coefficient Matrix in Unconditional Quantile RegressionsI am running models with the ivqte command, which estimates unconditional quantile regressions, as d…
-cem- and treated vs untreatedHello stata-users, When using -cem- matching approach, I get 3 variables cem_strata, cem_matched, an…
t(100) specificationI have received the following request from one of our clients: PDF codebooks Please use the t(100)…
Duplicating a long IDDear Statalisters, I am working on a panel data set to uniquely identify respondents across time. I…
Subscribe to:
Post Comments (Atom)
0 Response to Advice regarding panel data and collapse
Post a Comment