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
How to get first difference of count variable for poisson regressionPoisson regression (xtpoisson) requires the dependent variable to be a non-negative count variable. …
reshape long drops variablesI am trying to reshape my data from wide to long. i have 2000 household with up to 18 members in a h…
xtabond for non-linear panel dataIs there xtabond for non-linear panel data? I am running a poison fixed effects model and trying to …
fastreshape resultsI've been reshaping an entire electoral roll (over 3 million entries) to get up to 12 flatmates in S…
Store the outcome from xttest0Hi Guys I meet the problem when I am trying to store the result from xttest0. I learned how to stor…
Subscribe to:
Post Comments (Atom)
0 Response to Collapse with percentage of population in a dummy variable wrt region and year
Post a Comment