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.