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
Summary statistics and missing values for a local in a loopHi. I have the following local which comprises of some continuous variables and some categorical var…
Multiple rows in x-axis (months and years in t-axis)I'm currently working with some data that I need visualized over time since March 2020. I'm using la…
Absence of difference in Hansen test in xtabond2 and difference between suboptions equation(level) and equation(diff) in ivstyleDear statalists, I'm learning how to use the command xtabond2, but I'm not sure about a few things …
IntegrationHello everyone, Does anyone know how to do a granger test with a variable I(0) and a variable I(1)?…
First order factor analysisHi everyone! I am estimating a first order confirmatory factor analysis . When I get teh results I d…
Subscribe to:
Post Comments (Atom)
0 Response to Collapse with percentage of population in a dummy variable wrt region and year
Post a Comment