I am trying to do a table that shows the proportions/percentages of ppl who answered yes to a question (q14301_2) on three levels: gender, region (urban vs. rural) and age group.
I tried to do it using a loop and tabout but was not successful.
here is an example of my data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(q14301_2 agegrp1 urban) float female 2 8 1 1 2 10 1 1 2 1 1 0 2 5 1 0 2 6 1 0 2 1 1 0 2 1 1 0 2 5 1 0 2 6 1 0 2 5 1 0 end label values q14301_2 yesno label def yesno 2 " No", modify label values agegrp1 agegrp1 label def agegrp1 1 "00_05", modify label def agegrp1 5 "20_29", modify label def agegrp1 6 "30_39", modify label def agegrp1 8 "50_59", modify label def agegrp1 10 "=>65", modify label values urban Lurban label def Lurban 1 "Urban", modify
Maye
0 Response to tabout three ways table
Post a Comment