Hi everyone,
I am currently working with data of following Format
Year Region Dummy
2001 11 0
2001 11 0
2001 11 1
2001 12 1
2001 12 1
2001 12 0
2002 11 1
2002 11 1
2002 11 1
2002 12 1
2002 12 0
I want to collapse the data in such a way that i have result like this
Year Region percentage of population in a region in a given year that has dummy value 1
2001 11 0.33
2001 12 0.66
2002 11 1
2002 12 0.66
Any help in this regard is highly appreciated.
Related Posts with Collapse with percentage of population in a dummy variable wrt region and year
Matrix of matricesDears I would like to create a matrix containing the results of other matrices generated after the …
panel data analysisHello, I am performing analysis on an unbalanced panel dataset, of 160 firms which have data availa…
Converting annual to quarterly GDPHello everyone. I am trying to convert annual data to quarterly data. In particular, I have annual G…
Difference-in-difference fixed effects for discontinued treatmentDear all, I am trying to run a difference-in-difference fixed-effects model to estimate the effect …
Create a variable counting occurrencesHello, I'm using Stata for the first time and encountered some difficulties. I'm working with Stat…
Subscribe to:
Post Comments (Atom)
0 Response to Collapse with percentage of population in a dummy variable wrt region and year
Post a Comment