I am trying to graph the percentage of child brides by country subdivisions. Every area (GOV) has subdivisions (QISM).
To do this I would like to calculate the total number of child brides in each QISM divided by the total number of child brides in the country (i.e. of all the GOVS) expressed as a percentage.
A child bride is any girl married before the age of 18, the marriage age is AGEMAR1 in my dataset.
I am not sure how to do this in Stata, I have included an example of my dataset
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str23 indid str21 hhid int round byte(agemar1 qism gov sex) "9801000102" "98010001" 1998 15 2 1 2 "9801000104" "98010001" 1998 . 2 1 2 "9801000105" "98010001" 1998 . 2 2 2 "9801000107" "98010001" 1998 . 2 1 2 "9801000201" "98010002" 1998 15 2 1 2 "9801000202" "98010002" 1998 17 2 1 2 "9801000302" "98010003" 1998 16 2 1 2 "9801000303" "98010003" 1998 . 2 1 2 "9801000305" "98010003" 1998 19 2 1 2 "9801000309" "98010003" 1998 23 2 1 2 "9801000310" "98010003" 1998 . 2 1 2 "9801000402" "98010004" 1998 19 2 1 2 "9801000403" "98010004" 1998 . 2 1 2 "9801000502" "98010005" 1998 22 2 1 2 "9801000503" "98010005" 1998 . 2 1 2 "9801000602" "98010006" 1998 19 2 1 2 "9801000702" "98010007" 1998 16 2 1 2 "9801000703" "98010007" 1998 . 2 1 2 "9801000705" "98010007" 1998 . 2 1 2 "9801000802" "98010008" 1998 15 2 1 2 "9801000902" "98010009" 1998 23 2 1 2 "9801001002" "98010010" 1998 23 2 1 2 "9801001005" "98010010" 1998 20 2 1 2 "9801001007" "98010010" 1998 . 2 1 2 "9801001101" "98010011" 1998 24 2 1 2 "9801001105" "98010011" 1998 27 2 1 2 "9801001202" "98010012" 1998 19 2 1 2 "9801001203" "98010012" 1998 . 2 1 2 "9801001205" "98010012" 1998 . 2 1 2 "9801001302" "98010013" 1998 28 2 1 2 "9801001305" "98010013" 1998 . 2 1 2 "9801001307" "98010013" 1998 . 2 1 2 "9801001308" "98010013" 1998 . 2 1 2 "9801001402" "98010014" 1998 17 2 1 2 "9801001405" "98010014" 1998 18 2 1 2 "9801001501" "98010015" 1998 23 2 1 2 "9801001504" "98010015" 1998 . 2 1 2 "9801001602" "98010016" 1998 20 2 1 2 "9801001604" "98010016" 1998 15 2 1 2 "9801001702" "98010017" 1998 40 2 1 2 "9801001802" "98010018" 1998 23 2 1 2 "9801001804" "98010018" 1998 21 2 1 2 "9801001902" "98010019" 1998 19 2 1 2 "9801002001" "98010020" 1998 21 2 1 2 "9801002002" "98010020" 1998 . 2 1 2 "9801002004" "98010020" 1998 17 2 1 2 "9801002102" "98010021" 1998 23 2 1 2 "9801002105" "98010021" 1998 . 2 1 2 "9801002202" "98010022" 1998 19 2 1 2 "9801002205" "98010022" 1998 25 2 1 2 "9801002302" "98010023" 1998 23 2 1 2 "9801002304" "98010023" 1998 . 2 1 2 "9801002305" "98010023" 1998 . 2 1 2 "9801002402" "98010024" 1998 20 2 1 2 "9801002403" "98010024" 1998 . 2 1 2 "9801002404" "98010024" 1998 . 2 1 2 "9801002405" "98010024" 1998 . 2 1 2 "9801002406" "98010024" 1998 . 2 1 2 "9801002407" "98010024" 1998 . 2 1 2 "9801002502" "98010025" 1998 18 2 1 2 "9801002503" "98010025" 1998 . 2 1 2 "9801004102" "98010041" 1998 14 2 1 2 "9801004202" "98010042" 1998 15 2 1 2 "9801004302" "98010043" 1998 19 2 1 2 "9801004303" "98010043" 1998 . 2 1 2 "9801004402" "98010044" 1998 19 2 1 2 "9801004403" "98010044" 1998 . 2 1 2 "9801004404" "98010044" 1998 . 2 1 2 "9801004405" "98010044" 1998 . 2 1 2 "9801004502" "98010045" 1998 15 2 1 2 "9801004505" "98010045" 1998 16 2 1 2 "9801004601" "98010046" 1998 15 2 1 2 "9801004602" "98010046" 1998 . 2 1 2 "9801004604" "98010046" 1998 23 2 1 2 "9801004606" "98010046" 1998 17 2 1 2 "9801004702" "98010047" 1998 17 2 1 2 "9801004703" "98010047" 1998 . 2 1 2 "9801004802" "98010048" 1998 23 2 1 2 "9801004803" "98010048" 1998 . 2 1 2 "9801004804" "98010048" 1998 . 2 1 2 "9801004901" "98010049" 1998 24 2 1 2 "9801004903" "98010049" 1998 19 2 1 2 "9801004904" "98010049" 1998 . 2 1 2 "9801004906" "98010049" 1998 . 2 1 2 "9801005002" "98010050" 1998 18 2 1 2 "9801005003" "98010050" 1998 . 2 1 2 "9801005005" "98010050" 1998 . 2 1 2 "9801005102" "98010051" 1998 25 2 1 2 "9801005104" "98010051" 1998 . 2 1 2 "9801005105" "98010051" 1998 . 2 1 2 "9801005202" "98010052" 1998 20 2 1 2 "9801005204" "98010052" 1998 . 2 1 2 "9801005205" "98010052" 1998 . 2 1 2 "9801005302" "98010053" 1998 22 2 1 2 "9801005305" "98010053" 1998 . 2 1 2 "9801005402" "98010054" 1998 20 2 1 2 "9801005405" "98010054" 1998 . 2 1 2 "9801005502" "98010055" 1998 19 2 1 2 "9801005503" "98010055" 1998 . 2 1 2 "9801005504" "98010055" 1998 . 2 1 2 end label values gov Lgov label def Lgov 1 "Cairo", modify label def Lgov 2 "Alex.", modify label values sex sex label def sex 2 " Female", modify
0 Response to Calculating percentages
Post a Comment