The DHS Program User Forum       Discussions regarding The DHS Program data and results
Home » Countries » Bangladesh » Selecting children who "Finished primary school"
Selecting children who "Finished primary school" Fri, 06 October 2017 10:27
 suzzon Messages: 18Registered: July 2013 Location: Bangladesh Member
Dear DHS experts,

I am using the Bangladesh DHS 2011 Household members data files. I want to select children 12 to 15 years of age attending 6th grade (for 12 years-old) and completing 6 or more years of education (for 13-15 years-old). I am using HV124 (Education in single years-current school year) variable as the appropriate education variable. I am providing the Stata code for this calculation:

```gen finished_primary=0
replace finished_primary=1 if hv124==6 & hv105 == 12
replace finished_primary=1 if hv124>=6 & hv105 >= 13 & hv105 <=15```

I want to know am I doing it correctly in Stata? Is HV124 the correct variable to use for this purpose? If not which education variable should I use?

Re: Selecting children who "Finished primary school" [message #13251 is a reply to message #13229] Mon, 09 October 2017 07:45
 Bridgette-DHS Messages: 1456Registered: February 2013 Senior Member

Following is a response from Senior DHS Stata Specialist, Tom Pullum:

I agree but with the following modifications. If you look at the children age 12 in this survey (the file is BDPR61FL.dta), and enter "tab hv124" you will see that hv124 ranges from 0 through 10. How would you interpret the values 7, 8, 9, or 10? Perhaps you should replace lines 2 and 3 with "replace finished_primary=1 if hv124>=6 & hv105 >= 12 & hv105 <=15". Having completed primary school is also given by hv106 equal to 1 or 2 or 3. You could use hv106 rather than hv124. If working with all countries, you cannot assume that grade 6 is the last grade of primary school. There are some variations in this from one country to another.

Another thing--the NA code (something incorrectly used as Missing) will be included with hv124>=6. It would be safer to include "& hv124<." after the "if". If the variable had other Missing codes such as 99 you would want to set an upper limit lower than that.

 Previous Topic: Age at first birth Next Topic: current use of contraception 2011
Goto Forum:

Current Time: Wed Sep 19 05:58:27 Eastern Daylight Time 2018