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
missing pseudo R-squareds using -reghdfe-Hi, Everyone, I met a problem when using -reghdfe- command. in the regression I include three inter…
Convert calendar date to fiscal quartersDear all, I've a question on how to convert calendar dates to different (i.e. fiscal) quarters in S…
Can parametric and non-parametric tests lead to different results?This may be a basic econometrics question but I cannot find an answer. I know under what conditions …
Converting calendar dates to different quartersDear all, I've a question on how to convert calendar dates to different (i.e. fiscal) quarters in S…
How to deal with categorical variable (a group of dummy vars) in Multilevel model?Hi there, I'm working on a dataset with individual-level and school-level variables using multileve…
Subscribe to:
Post Comments (Atom)
0 Response to Collapse with percentage of population in a dummy variable wrt region and year
Post a Comment