How can we make the drop out rate calculation in stata?

we just tried in the following way

********for Penta and Measles dropout*****Dependent variable********

gen DPT_1 = inrange(h3,1,3)

gen DPT_2 = inrange(h5,1,3)

gen DPT_3 = inrange(h7,1,3)

gen DPT_dropout= DPT_1-DPT_3

gen ms_dropout = DPT_1-ms

gen Penta_drop_rate= (DPT_1-DPT_3/DPT_1)*100

gen ms_drop_rate= (DPT_1-ms/DPT_1)*100

************dropout is a binary variable for both Pentavalent and Measles

we have also come up with different number of children in the individual record and the child re-code data set. Even though the target group is children; we thought that it was the women who was interviewed. so please would you mind if you make this things clear?

since we will use few variables from individual re-code and some other from child re-code; how do we merge this two data sets. or is that possible to use child re-code data set for all maternal characteristics?

thank you in advance for your swift response ]]>

All the numbers in DHS reports are weighted by v005. Are you using weights? If you cannot match a number in a report, please tell us which number in which table in which report.

I have not worked with a DPT dropout variable before but I assume your DPT_dropout variable should would be calculated as follows:

gen DPT_dropout=0 if inrange(h3,1,3)==1

replace DPT_dropout=1 if DPT_dropout==0 & inrange(h,1,3)==0

I don't know what your "ms" variable is (it must be related to h9) but the logic would be the same. The dropout variable should be a binary variable that is conditional on having received DPT1, and it is NA (a dot in Stata) if the child did not receive DPT1. That is, it is NA if the did not receive DPT1, 0 if it received DPT1 but not DPT3, and 1 if it received DPT1 AND DPT3. That's what the two Stata lines would construct.

The woman is interviewed. In the KR file there is one record for each child born in the past five years. The file includes children who have died. The child's record includes most of the mother's variables, and there is hardly ever a reason to merge the KR and IR files.

]]>

following the Mini EDHS report given figure 8.1 childhood vaccination

we did analysis and we failed to complement with the result given in this section(figure 8.1 ; page 76) with its narratives

how this could be handled

second question

Regarding the Pentavalent and Measles dropout

Pentavalen dropout can be calculated using the difference between (DPT1-DPT3) and dropout rate (DPT1-DPT3/DPT1*100)

Measles dropout can also be calculated using the difference between (DPT1-Measles1) and dropout rate (DPT1-Measles/DPT1*100)

we generated dropout var and we did as per the above formula on stata

for the rest of the vaccination the result reported and our analysis result differ. This also includes the drop out which we generated using the following stata command

gen penta_drop= (DPT1-DPT3)

gen penta_droprate=( DPT1-DPT3)/DPT1*100

gen Measles_drop= (DPT1-Measles)

gen Measles_droprate=( DPT1-Measles)/DPT1*100

our result didn't complement with the finding reported under childhood vaccination

figure 8.1

the following is copied from the report for clearity

*****Coverage rates decline for subsequent doses of these vaccines, with 61% of children age 12-23 months

receiving the recommended three doses of DPT-HepB-Hib vaccine and 60% receiving all three doses of

the polio vaccine. There is a 15 percentage-point dropout rate within this age group from the first to the

third dose of the DPT-HepB-Hib vaccine and an 18 percentage-point dropout rate from the first to the third

dose of the polio vaccine.

Would you please help us

thank you

]]>

You seem to have ignored the earlier response. A difference such as "DPT1-DPT3" is not part of the calculation of a dropout rate.

Figure 8.1 is based on table 8.1, on page 80 of the final report. That table does not include dropout rates. Please tell us a specific number in table 8.1 that you are unable to match.

]]>

The drop out report was actually described below the bar graph (figure 8.1).

]]>

I thought you were asking about something in the individual-level data files, and misinterpreted your question. Looking at figure 8.1 in the final report, the percentage receiving polio 1 was 78% and the percentage receiving polio 3 was 60%. The report is incorrect in saying that there was a dropout rate of 18%. It would have been correct to say that there was a decline of 18 percentage points. However, as you say, the dropout rate would be (78-60)/78 = 23%. Thank you for noting this. I will try to make sure that this type of mistake is avoided in future reports.]]>

I was trying to exclude unvaccinated children from the analysis but don't know the stata code.

I am using the KR data

Thank you]]>

Here is the location of the Stata code for all indicators in the final reports: https://github.com/DHSProgram/DHS-Indicators-Stata. Be sure to read the documentation. If you have a question for the forum, please be more specific about what you want to do. ]]>

In Ethiopia mini dhs 2019 report page 76, Figure 8.1 the percentage of unvaccinated children 19% (the none category on the graph). I was trying to get that 19% using stata code. So my question was what was the stata command that brings this 19%?

Thanks again]]>

The required code you need is found here: https://github.com/DHSProgram/DHS-Indicators-Stata/tree/mast er/Chap10_CH

Please first open the main do file to compute the age variable then you can run the CH_VAC.do file . The indicator you are looking for is ch_novac_either

tab ch_novac_either [iw=v005/1000000]

This will match the final report with 19.2%.

Thank you.

Best,

Shireen Assaf

The DHS Program]]>

** We are confused how to exclude the unvaccinated children from the analysis (because our aim is to calculate the number of children drop out/not drop out and also calculating the dropout rate)

According WHO and Ethiopia EPI guideline

The percentage of children aged 12-23 months who dropped out from pentavalent and measles vaccination can be calculated by

(1) Subtracting the third dose of pentavalent vaccine from the first dose of pentavalent vaccine, (The difference between DPT1-DPT3)

(2) (2) subtracting the first dose of measles vaccine from the first dose pentavalent vaccine (the difference between DPT1 Measles1)

(3) Dropout rate could be calculated using

I. Penta = (dpt1- dpt3)/dpt1*100

II. Measles= (dpt1-Measles)/dpt1*100

We faced the following challenge

For calculating the drop outs or dropout rate; we have to exclude the number of unvaccinated children . However: when we try to do that using the following stata command ; the total number of children in the data set decreases and becomes equal for all (DPT1,DPT2 and Measles) (it becomes 587 for all)

(When we try to drop the unvaccinated children from dpt1 and dpt3 separately; the sample size drops)

Stata command: Drop if dpt1==0 & drop if dpt3==0 & drop if measlea==0

What should be the command?

The other challenge was the difference in sample size

In EDHS 2019 report, the sample size for children aged 12 to 23 months was 1028. In our data set we get 1008 using the following stata code. We couldn't figure out where the 20 children are lost? Would you please help us address this problem

Stata command used;

Child_age = 12-23 months old

gen months = b19

keep if b5 == 1 & months >= 12 & months <=23

Thanks

]]>

Although I am not familiar with this indicator, I don't believe you need to drop any children. The vaccination variables are binary variables with zeros and ones so we know who did not get the vaccine.

After running the correct do file (CH_VAC.do) and selecting live children from the correct age group as you have done, you can use the following variables for the calculation in the formula you show:

gen penta= ((ch_pent1_either - ch_pent3_either)/ch_pent1_either)*100

gen measles= ((ch_pent1_either-ch_meas_either)/ch_pent1_either)*100

This gives an unweighted number of children of 727 which is the number of children that had the dpt1 (ch_pent1_either) vaccine.

For your question on the number of children, you need to apply sample weights to get the correct number. This is for all estimates including the above. To do this you first calculate the weight variable as follows:

gen wt=v005/1000000

Then apply it to your tabulations, all tabulations:

*this gives the weighted number of 1028

tab b5 [iw=wt]

*this gives the weighted number of 785

tab penta [iw=wt]

Thank you.

Best,

Shireen Assaf

The DHS Program

]]>

Now we are clear with all our questions

Thank you so much shireen]]>

Shireen]]>

I am sorry I came back

The caseid is a string var and we need id for our analysis. so, is that possible to use the alternative v002 /v003 which are numeric as an ID? or is there a mechanism to destring the caseid(we tried and failed)

thanks]]>

Yes you cannot destring the caseid because it contains spaces (i.e. characters).

The case ID is made up of v001 , v002, and v003. See the attached file which is a screenshot of your data before dropping any children and after sorting as follows:

sort v001 v002 v003

br caseid v001 v002 v003 b16 b5

As you can see in the highlighted rows, these are three children with the same mother (v003=2) and in the same household (v002=73). b16 is the child's line number which is missing for one child because they are not living.

So a unique ID for the child should include v001, v002, and b16.

You can learn more about this in the Guide to DHS Statistics, Analyzing Data section, Matching and Merging Datasets subsection: https://www.dhsprogram.com/Data/Guide-to-DHS-Statistics/inde x.htm#t=Analyzing_DHS_Data.htm%23Matching_and_Mergingbc-7&am p;rhtocid=_4_4_6

Hope this helps.

Best,

Shireen Assaf

The DHS Program]]>

v002, v003, b16

thanks]]>

You can use the following command. For the KR file you should actually use bidx not b16.

egen ID=group(v001 v002 v003 bidx)

This will just number the children from 1 to N.

The following would give you the same ID.

gen ID2 = _n

Best,

Shireen

]]>

Thank you for your time, timely response and continuous support. We really get a chance to learn a lot from you and your team.

God bless you!!

]]>