Teklay Desta’s Updates

Week 3 Analyst assignment

week 3 analyst assignmnet

Assignment

Calculate three point estimates for Penta3 coverage for the state of Akwa Ibom.

1. Coverage by card (numerator = sum of weights for kids where got_crude_penta3_by_card is 1; denominator = sum of weights for all kids in the dataset in Akwa Ibom)

2. Coverage by recall (numerator = sum of weights for kids where got_crude_penta3_by_history is 1 ; denominator = sum of weights for all kids in the dataset in Akwa Ibom)

3. Coverage by card or recall (numerator = sum of weights for kids where got_crude_penta3_c_or_h is 1; denominator = sum of weights for all kids)

Answer

1. Coverage by card the number numerator = sum of weights for kids where got_crude_penta3_by_card is 1; denominator = sum of weights for all kids in the dataset in Akwa Ibom)

Numerator:

As the number 1 is assigned to those vaccinated by card, sum of weights for kids where vaccinated by card will be sum of the product of 1 x psweight, which means sum of the psweight in the state of Akwa Ibom where got_crude_penta3_by_card==1

tabstat psweight if got_crude_penta3_by_card==1&RI02=="Akwa Ibom", stat(sum)

which gives 57.97359

denominator

as all the records represent eligible children then the denominator will be the sum of weight of all the eligible children in Akwa Ibom

tabstat psweight if RI02=="Akwa Ibom", stat(sum)

which gives 119.9671

hence the vaccinated by card coverage will be (57.97359/119.9671)=48.32%

the same result can be achieved by running the following code

tab got_crude_penta3_by_card if RI02 =="Akwa Ibom" [iweight=psweight]

Got penta3, |by card | Freq. Percent Cum.

------------+-----------------------------------

0 |61.99353236 51.68 51.68

1 | 57.9735949 48.32 100.00

------------+-----------------------------------

Total | 119.967127 100.00

2.Coverage by recall (numerator = sum of weights for kids where got_crude_penta3_by_history is 1 ; denominator = sum of weights for all kids in the dataset in Akwa Ibom)

Numerator:

As the number 1 is assigned to those vaccinated by history, sum of weights for kids where vaccinated by history will be sum of the product of 1 x psweight, which means sum of the psweight in the state of Akwa Ibom where got_crude_penta3_by_history ==1

tabstat psweight if got_crude_penta3_by_history==1&RI02=="Akwa Ibom", stat(sum)

which gives 24.13

denominator

as all the records represent eligible children then the denominator will be the sum of weight of all the eligible children in Akwa Ibom

tabstat psweight if RI02=="Akwa Ibom", stat(sum)

which gives 119.9671

hence the vaccinated by card coverage will be (24.13187/119.9671)=20.12%

the same result can be achieved by running the following code

tab got_crude_penta3_by_history if RI02 =="Akwa Ibom" [iweight=psweight]

Got penta3, |

by history | Freq. Percent Cum.

------------+-----------------------------------

0 | 95.8352615 79.88 79.88

1 |24.13186577 20.12 100.00

------------+-----------------------------------

Total | 119.967127 100.00

3.Coverage by card or recall (numerator = sum of weights for kids where got_crude_penta3_c_or_h is 1; denominator = sum of weights for all kids)

Numerator:

As the number 1 is assigned to those vaccinated by history or card, sum of weights for kids where vaccinated by history or card will be sum of the product of 1 x psweight, which means sum of the psweight in the state of Akwa Ibom where got_crude_penta3_c_or_h=1

tabstat psweight if got_crude_penta3_by_history==1&RI02=="Akwa Ibom", stat(sum)

which gives 82.105

denominator

as all the records represent eligible children then the denominator will be the sum of weight of all the eligible children in Akwa Ibom

tabstat psweight if RI02=="Akwa Ibom", stat(sum)

which gives 119.9671

hence the vaccinated by card coverage will be (82.10546/119.9671)=68.44%

tab got_crude_penta3_c_or_h if RI02 =="Akwa Ibom" [iweight=psweight]

Got penta3, |

by card or |

history | Freq. Percent Cum.

------------+-----------------------------------

0 |37.86166659 31.56 31.56

1 | 82.1054606 68.44 100.00

------------+-----------------------------------

Total | 119.967127 100.00

Express coverage on the percent scale (0-100%) instead of the proportion scale (0-1.0).

the following codes were used to generate the penta3 coverage by history and card

egen penta3_c_h_vac =total(psweight) if RI02=="Akwa Ibom" & got_crude_penta3_c_or_h // numerator

egen penta3_c_h_tot =total(psweight) if RI02=="Akwa Ibom" // denominator

gen penta3_c_h_coverage=(penta3_c_h_vac/penta3_c_h_tot) // coverage

gen penta3_c_h_coverage2=penta3_c_h_coverage*100

gen penta3_c_h_coverage3=penta3_c_h_coverage2

gen penta3_c_h_coverage4 = string(penta3_c_h_coverage2)+"%"

Present your results in the text of a community update.

Additional Challenge #1: Populate a table with the three coverage values for each of the 11 states in the dataset.

*by card numerator, denominator and coverage

egen penta3_bycard_vac =total(got_crude_penta3_by_card), by (RI02)

egen total_eligible =count(got_crude_penta3_by_card), by (RI02)

gen penta3_bycard_cov = (penta3_bycard_vac/total_eligible)*100

tabstat penta3_bycard_cov, by(RI02) stat(mean)

*by history numerator, denominator and coverage

egen penta3_byhistory_vac =total(got_crude_penta3_by_history), by (RI02)

gen penta3_byhistory_cov = (penta3_byhistory_vac/total_eligible)*100

tabstat penta3_byhistory_cov, by(RI02) stat(mean)

*by card and history numerator, denominator and coverage

egen penta3_by_card_history_vac =total(got_crude_penta3_c_or_h), by (RI02)

gen penta3_by_card_history_cov = (penta3_by_card_history_vac/total_eligible)*100

tabstat penta3_by_card_history_cov, by(RI02) stat(mean)

* all the three coverages

tabstat penta3_bycard_cov penta3_byhistory_cov penta3_by_card_history_cov, by(RI02) stat(mean)

Additional Challenge #2: Add two rows to the Challenge 1 table that also include 3 coverage values for the two zones (zone id and name are held in the variables level2id and level2name); organize results by zone and state

One approach to solve this problem is

i.1st save the data with the derived variables that hold the three coverage variables ( penta3_coverage by state and zone level) and then collapse the three coverages mean by state and save the records in to a new file name called state level coverage

ii.2nd open again the file with derived penta3_coverage and then collapse the three coverages mean by zone level this will two records for the two zones

iii.3rd add zone file to the state and add the zone names to the zone variable in the state filr records similarly add state variable into the zone level records then rename the three penta3 coverage variables in both files to match the name of the variables then append the two files and that will give the coverage for the 12 states plus two ones then sort by zone

the command below gives the coverage by zone for card plus history

tab level2name got_crude_penta3_c_or_h,row

the coverage is 24.09% for the North East zone and 61.05% for the South South zone similarly the following commands give the same result

* penta3 crude coverage by card_history numerator, denominator and coverage by Zone

egen penta3_by_c_h__zone_vac =total(got_crude_penta3_c_or_h), by (level2name)

egen total_eligible_zone =count(got_crude_penta3_c_or_h), by (level2name)

gen penta3_by_c_h__zone_cov = (penta3_by_c_h__zone_vac/total_eligible_zone)*100

tabstat penta3_by_c_h__zone_cov, by(level2name) stat(mean)

Additional Challenge #3: Estimate weighted penta3 coverage in Akwa Ibom separately for boys and girls. (No confidence intervals this week...just point estimates)

As no weight of sex is given to post stratify, the psweight will be used for weighting the coverage by sex

In Akwa Ibom

The following approach will be used to generate the weighted coverage of the three variables by sex

*clculating numerator, denomiantor, and coverage for penra3-c_or-h for males

egen penta3_c_h_vac_male =total(psweight) if RI02=="Akwa Ibom" & got_crude_penta3_c_or_h==1& MICS_5_hl4 ==1 // numerator

egen penta3_c_h_tot_male =total(psweight) if RI02=="Akwa Ibom" & MICS_5_hl4 ==1 // denominator

gen penta3_c_h_male_coverage=(penta3_c_h_vac_male/penta3_c_h_tot_male) // coverage

*clculating numerator, denomiantor, and coverage for penra3-c_or-h for Females

egen penta3_c_h_vac_Female =total(psweight) if RI02=="Akwa Ibom" & got_crude_penta3_c_or_h==1& MICS_5_hl4 ==2 // numerator

egen penta3_c_h_tot_Female =total(psweight) if RI02=="Akwa Ibom" & MICS_5_hl4 ==2 // denominator

gen penta3_c_h_Female_coverage=(penta3_c_h_vac_Female/penta3_c_h_tot_Female) // coverage

*clculating numerator, denomiantor, and coverage for penra3-card for males

egen penta3_card_vac_male =total(psweight) if RI02=="Akwa Ibom" & got_crude_penta3_by_card==1& MICS_5_hl4 ==1 // numerator

egen penta3_card_tot_male =total(psweight) if RI02=="Akwa Ibom" & MICS_5_hl4 ==1 // denominator

gen penta3_card_male_coverage=(penta3_card_vac_male/penta3_card_tot_male) // coverage

*clculating numerator, denomiantor, and coverage for penra3-c_or-h for Females

egen penta3_card_vac_Female =total(psweight) if RI02=="Akwa Ibom" & got_crude_penta3_by_card==1& MICS_5_hl4 ==2 // numerator

egen penta3_card_tot_Female =total(psweight) if RI02=="Akwa Ibom" & MICS_5_hl4 ==2 // denominator

gen penta3_card_Female_coverage=(penta3_card_vac_Female/penta3_card_tot_Female) // coverage

*clculating numerator, denomiantor, and coverage for penra3-history for males

egen penta3_history_vac_male =total(psweight) if RI02=="Akwa Ibom" & got_crude_penta3_by_history==1& MICS_5_hl4 ==1 // numerator

egen penta3_history_tot_male =total(psweight) if RI02=="Akwa Ibom" & MICS_5_hl4 ==1 // denominator

gen penta3_history_male_coverage=(penta3_history_vac_male/penta3_history_tot_male) // coverage

*clculating numerator, denomiantor, and coverage for penra3-c_or-h for Females

egen penta3_history_vac_Female =total(psweight) if RI02=="Akwa Ibom" & got_crude_penta3_by_history==1& MICS_5_hl4 ==2 // numerator

egen penta3_history_tot_Female =total(psweight) if RI02=="Akwa Ibom" & MICS_5_hl4 ==2 // denominator

gen penta3_history_Female_coverage=(penta3_history_vac_Female/penta3_history_tot_Female) // coverage

 

  • Carolina Danovaro