Hello
I have a dataset like this:
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(year var1 var2)
2012 1 .
2012 1 1
2012 1 .
2013 1 .
2013 . 1
2016 1 .
2016 1 1
2016 . 1
end
and I want to plot the frequency percentage of var1 and var2 per year.
for ex.: in 2012: total freq. of var1 and 2 =1+3=4 and share of each var1=.75 and var2=0.25
so y for x=2012 will be equal to 0.25 for var2 and .75 for var1
and I want to repeat this command for other years too.

Thanks