The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » Kenya DHS weights (Kenya DHS weights)
Kenya DHS weights [message #27983] Tue, 31 October 2023 06:53 Go to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Dear all,

I am looking at school enrollment, progression and repetition for children in Kenya - I am looking at these indicators grade-wise. I have a few questions:

1. For school enrollment - I am looking at hv121 and hv125 (member attended school current and previous year respectively) - now for Grade 1 I see there are respondents who said "yes" to hv125 (attended school last year) - what does it mean? Does it mean these children were in pre-primary or early childhood education? I am asking because the number is high.

2. Secondly, to make calculations easier - I have re-coded secondary-level grades and higher level grades. Secondary-level grades have been coded as 9,10,11,12,13,14 and similarly higher-education grades have been coded from 13-19. Nonetheless, I am using the following code:

tab agrdprvyr_i scheprvyr_i [iweight = hv005/1000000]

agrdprvyr_i is previous year grades (coded as hv127 in DHS) and scheprvyr_i is school enrollment last year (coded as hv125 in DHS)

My question is that when I use weights, why is the "number of observations" decreasing? Secondly the data is showing that only 1621 individuals were enrolled in grade 12 last year - but this is a very small number, and doesn't seem right. Am I doing anything wrong with the weights? Please help.

I have attached snapshots of both unweighted and weighted data

Best,
Ritapriya
Re: Kenya DHS weights [message #27984 is a reply to message #27983] Tue, 31 October 2023 09:25 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member
Following is a response from Senior DHS staff member, Tom Pullum:

First, weighted and unweighted frequencies are always different, sometimes by large amounts. If, in the PR file, you enter the following lines, you will see that the weights for children (age<18) are usually much less than 1 (ignoring the factor of one million).

gen wt=hv005/1000000
collapse (mean) wt, by(hv105)t
graph hbar wt, over(hv105) yline(1)

In this survey, apparently, fertility tended to be higher (that is, there were more children) in the strata (geographic areas) that were over-sampled. In order for the estimates to be unbiased, the weights for these strata tended to be less than one (ignoring the factor of one million).

Second, regarding the education variables, I suggest is that you read the questions, the codes, and the tables and text in the report very carefully. I agree that what you are seeing is hard to believe. I looked at the data too. There are many inconsistencies. For examples, among the 3-year old (hv105=3) I see a child who, according to hv126, attended secondary school the previous school year; there are 5 3-year olds who are in primary school this year AND were in primary school the previous year. Perhaps primary school includes day care?

The school attendance variables (hv121-hv129) were probably not edited as much as they could have been. These variables tend to be somewhat survey-specific, because of differences in standards (e.g. the starting age) and definitions from one country to another and even over time in the same country. You may want to edit the responses yourself for consistency.

Usually it would help to do "tab hv124 hv122" to see how single years line up with levels. However, when I do that, I see a possible coding error involving hv124 for single years 7-12. We will look into this further and may add another post on that.
Re: Kenya DHS weights [message #27986 is a reply to message #27984] Tue, 31 October 2023 09:50 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Hi

Thank you for the response

I understood your point, but with regards to weights, what should I do? Does it mean that what I did was correct, and that there are 1621 individuals in Grade 12 previous year, or should I use a different formula. Could you please clarify - I do understand that the weights of children is less than 1 - but wanted to ask what should I do about it - and how should I apply weights then

My current formula is tab hv121 hv127 [iweight = hv005/1000000]

Best
Ritapriya
Re: Kenya DHS weights [message #27987 is a reply to message #27984] Tue, 31 October 2023 09:58 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Sorry

So does this mean I should just use tab hv121 hv127 [iweight = hv005] - and not divide by 1 million? - In that case, the frequencies increase a lot - attached snapshot

Best
Ritapriya
Re: Kenya DHS weights [message #27990 is a reply to message #27987] Tue, 31 October 2023 10:56 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

The weight includes a factor of 1 million just to get rid of the decimal point. The mean of hv005 (ignoring that factor) in the HR file, with households as units, is 1.

You should always use weights to get unbiased estimates of means, proportions, percentages, ratios, rates, etc. You are using the correct formula.

The frequencies in the sample, unweighted or weighted, are not important--as I said, it's the means, etc., that are important, and you are ok with them.

Re: Kenya DHS weights [message #27992 is a reply to message #27990] Tue, 31 October 2023 11:13 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Okay thank you - I am going forward with: tab hv125 hv127 [iweight = hv005/1000000] then? - to tabulate previous year grade and enrolment status

Could you please also clarify what you meant by primary school involving day care? I have checked the report and coding - before primary level - there's only one level: no education/preschool/early childhood (this is coded as 0, primary level as 1, secondary as 2, higher as 3)


So I am assuming if grade 1 goers have "1" or "yes" to hv125 (member attended school last year) - then they were in early childhood/preschool education?

Also if children are in primary school this year and previous year, in the same grade - I believe that shows grade repetition as well

Best,
Ritapriya
Re: Kenya DHS weights [message #28027 is a reply to message #27992] Fri, 03 November 2023 08:23 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

I hope you recognize that grades are numbered within levels. In KEPR8B you can get the combinations of grade and level in the PREVIOUS YEAR with "tab hv127 hv126". These combinations are converted to education in single years (previous year), hv128. To see this, enter "tab hv127 hv126, summarize(hv128) means." This will give the value of hv128 within each combination of hv127 and hv126.

For the CURRENT YEAR you can do "tab hv123 hv122" and "tab hv123 hv122, summarize(hv124) means".

These tabulations do not use weights because I just want to describe the coding pattern. For actual analysis you would use weights.

You will see that year 7 can be either the 7th year of primary or the 1st year of secondary, and year 8 can be either the 8th grade of primary or the 2nd year of secondary. I am suspicious that there was a coding error somewhere in the hv12* variables, affecting years "single years" 7-12, and have asked the data processing staff to look into this. We will post more after hearing from them. Until then, I recommend caution.

To be clear, I agree that primary school is not "supposed to" include daycare. When I mentioned that this could happen I was describing potential errors or misinterpretations by the respondents or interviewers. I wanted to understand how very young children could be reported as attending primary school.

Re: Kenya DHS weights [message #28044 is a reply to message #28027] Mon, 06 November 2023 05:21 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Hi,

So yes, I got your point. I am using KEPR8BDT. However, I see that for last year grades, there is no one in grade 7 or 8 who is classified to be in secondary education - I have attached a snapshot of this. I have re-coded secondary grades to 9,10,11 and 12. Kenya follows a 8-4-4 system - so 8 years primary and then 4 years secondary - hence this aligns with Kenyan education system. However, it is also true that when I use education in single years - as in hv128 - I see that grade 7/8 can belong to either primary or secondary - so what does it mean? Does it mean that even though grade 7/8 are coded as primary grades, there's a possibility that they may be under secondary?

Best
Ritapriya
Re: Kenya DHS weights [message #28049 is a reply to message #28044] Mon, 06 November 2023 09:32 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

The data processing staff are revising the recodes for these variables. I hope to post them soon.

Re: Kenya DHS weights [message #28054 is a reply to message #28049] Mon, 06 November 2023 10:57 Go to previous messageGo to next message
sokiya is currently offline  sokiya
Messages: 76
Registered: May 2017
Location: Nairobi
Senior Member
Let me jump into this discussion since I am Kenyan and privy to the recent changes in the education system.
Actually, those are not coding errors. The education is transitioning fully (in my opinion from next year) from 8-4-4 system to 2-6-3-3-3. So it possible that during the data collection period, one would say that s/he in grade 6 and 7 and in junior secondary and another in the same grade but in primary. The last lost of students in grade 8 in primary have just sat their KCPE
Re: Kenya DHS weights [message #28058 is a reply to message #28054] Mon, 06 November 2023 13:15 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

Several variables giving single years of education need to be recoded. They were previously coded with 6 years of primary and 6 of secondary. However, as you say, Kenya has 8 and 4, respectively. For example, hv128 in the PR file was constructed as

gen hv128= hv127 if hv126==1
replace hv128= 6+hv127 if hv126==2
replace hv128=12+hv127 if hv126==3

However, it should have been calculated as follows, with 8 rather than 6 in the second line:

gen hv128= hv127 if hv126==1
replace hv128= 8+hv127 if hv126==2
replace hv128=12+hv127 if hv126==3

The variables affected--that is, that need to be recoded--are hv108, hv124, hv128, v133, v715, and mv715. The next update of the files will include corrected versions of these variables, but you can fix them now.

Re: Kenya DHS weights [message #28063 is a reply to message #28054] Tue, 07 November 2023 04:43 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Dear all,

Thank you so much for all the suggestions and corrections - I would definitely keep them in mind for analyzing education data from the Kenya DHS 2022. Thank you also for letting me know that the Kenyan education system is changing.

I had a few questions:

Just to confirm, primary school is 8 years of education, secondary schooling is 4, then how many years are higher education? Also by this format Grade 7/8 are in primary level then? - do you know when the updated data will be released?

Best,
Ritapriya
Re: Kenya DHS weights [message #28064 is a reply to message #28063] Tue, 07 November 2023 09:44 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

Yes, in an 8+4 breakdown, grades 7 and 8 would be grouped with primary. I would expect that the changes in the primary and secondary breakdown would not affect the standard number of years for post-secondary.

DHS staff cannot respond to questions about country-specific education systems. Perhaps other users can help. You may also be able to find a Kenyan or UN website with such information.

I don't know when the updated files will be released, but when it happens, a data alert will be sent out to users who downloaded the previous version. Only the recodes of single years of schooling are affected and you can revise them yourself.
Re: Kenya DHS weights [message #28088 is a reply to message #28064] Fri, 10 November 2023 05:13 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Hello, thanks a lot.

I am just wondering that beyond 9,10,11,12 - there are two other grades (13/14) - which I believe are coded as secondary - so what to do with that?

I wanted to confirm two more things:

1. hv121 and hv125 represent school enrollment in current and previous school year right?

2. Secondly, I wanted to confirm - I saw a variable coded as hv129 - it gives the number of students repeated, dropouts and progressed/advanced. Could you please tell me the STATA codes for calculating these? The reason I am asking this is because my definitions of repeats, progression and dropouts are the same as DHS (as I verified from DHS Recode Manual). Now for dropouts my numbers are same as DHS - but it doesn't match for repeats - hence I wanted to know the code for that.

I followed your advice, and have changed education in single years - 8 years primary and 4 years secondary. I renamed education single year previous year to "edusyr_prvyr" and education single year current year to "edusyr_cr". Now I did tab edusyr_prv hv129 and I did tab edusyr_cr hv129 - as you can see the repeat numbers are different in both these commands - but why so? This shouldn't happen - repeat numbers should stay same I believe if I use either current or previous year.

Secondly, if you see grade 7 and 8 particularly - there are very large numbers of students who are repeating - while this is believable, it doesn't match with mine, wondering why.

I have attached snapshots for:

1. tab edusyr_prvyr hv129 [education single year previous year - edusyr_prvyr]
2. tab edusyr_cr hv129 [education single year current year - edusyr_cr]
3. tab edusyr_cr repeat [education single year current year - edusyr_cr] - this is my calculation of repeats
Re: Kenya DHS weights [message #28091 is a reply to message #28088] Fri, 10 November 2023 08:43 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

These are good questions, but we cannot answer them at this time. The construction of the education variables in this survey is currently being reviewed by the DHS data processing staff. We will respond as soon as possible.

Re: Kenya DHS weights [message #28128 is a reply to message #28091] Thu, 16 November 2023 08:29 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Hi,

Thank you,

Just one thing - i am trying to look at dropouts right. Now i have calculated dropouts as those who said "yes" to attending school past year but not this year - however there are people who might have graduated right after class 12 (8+4 school system) - so I was wondering how to figure out how many graduated - should I do tab hv128 (past year grade - single education years) sh19aa (reason for not attending school) or should I do hv128 hv106 (hv106 - highest grade attended)


Best
Ritapriya
Re: Kenya DHS weights [message #28154 is a reply to message #28128] Mon, 20 November 2023 08:07 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

If someone attended grade 12 last year (hv126=2 and hv127=4), and is reported with "secondary" as the highest completed level (hv106=2), then they must have graduated last year. I think you can identify last year's high school graduates with this combination of hv126, hv127, and hv106. Other combinations involving current attendance (hv121-hv123) should identify dropping out or repeating grade 12 or continuing to post-secondary schooling.


Re: Kenya DHS weights [message #28163 is a reply to message #28154] Tue, 21 November 2023 02:34 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Clarify one thing

There are two variables that can give me school attendance in current/previous year - one is hv121/hv125 (school attendance status) and I believe the other is hv124/hv128 (education single years for each each year). As per our last discussion, you asked me to construct the hv128 variable as follows:

gen hv128= hv127 if hv126==1
replace hv128= 8+hv127 if hv126==2
replace hv128=12+hv127 if hv126==3

This was done to ensure 8 years of primary and 4 years of secondary school. I have done the same - I named it hv1281 so that original variable stays intact. Now, if I do tab hv1281 or tab hv1281 scheprvyr_i (latter one is the hv125 variable) - the numbers are same. As you can see, there are 5,113 students in grade 1 - so this is fine - I have attached screenshots for both commands.

However, as you can see, when I do hv1281 hv106 - there are students of grade 1 who have replied either no education or completed secondary education to hv106 - So the 5,113 individuals in Grade 1 comprise these individuals too? This is what I am confused about - 5,113 individuals said yes to school enrollment in previous year in grade 1 - but they also include those who said no education and completed secondary education to hv106? - so how many people are enrolled in grade 1 - 5,113 or 5,064?

Secondly, if that's the case then the 1,272 individuals who were in grade 12, secondary and said they completed education last year - can I really count them as graduated? Especially since there were also students in last year grade 12 who said they completed higher education. Plus, if I do hv1281 hv129 - the numbers for advanced, dropout, and repeats don't match with the 1,272 (number of students who are supposedly graduates as per hv1281 hv106) I have attached screenshots of hv1281 hv106 and hv1281 hv129.

To avoid confusion - I was looking at hv1281 sh19aa for graduates. From the 939 people in class 12 last year who dropped out (that is, not attending this year - you can see from hv1281 hv129), I am subtracting those in class 12 last year who said they stopped schooling as they have completed school (i get this number from hv1281 sh19aa).

I understand education variables are going through re-checking - but please do help at the moment - I may be incorrect in my approach

Best,
Ritapriya
Re: Kenya DHS weights [message #28168 is a reply to message #28163] Tue, 21 November 2023 09:19 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

I cannot give further recommendations for the recoding of the education variables in the Kenya 2022 survey. I do not want to risk saying something that will differ from the review. When the review has been completed, we will post the recodes and they will be included in the next update of the data files.
Re: Kenya DHS weights [message #28192 is a reply to message #28168] Tue, 28 November 2023 05:11 Go to previous messageGo to next message
Ritapriya Bandyopadhyay is currently offline  Ritapriya Bandyopadhyay
Messages: 13
Registered: October 2023
Member
Thank you so much, and yes, I agree

Also, could you please let me know if there's any variable in the DHS HH module where I can get the total number of births in a year? I am actually trying to find out the proportion of births in the lowest quintile - q1 births/total births in previous year.

If not, then should I go to women's module?

Best
Ritapriya
Re: Kenya DHS weights [message #28197 is a reply to message #28192] Tue, 28 November 2023 11:49 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3043
Registered: February 2013
Senior Member

Following is a response from Senior DHS staff member, Tom Pullum:

If you open the BR file and enter "tab b2 v190 [iweight=v005/1000000], row" you will get what I believe you are looking for, going back in single calendar years. In the BR and KR files, b2 is the calendar year of birth. Note that the household's wealth quintile at the time of the survey is not necessarily what it was in the past. Also, in the IR file, v209, v238, and v208 give the number of births the respondent had in the past year, 3 years, and 5 years (years ago, not calendar years), respectively.
Previous Topic: KDHS 2014 : Percentage of men who have ever experienced physical violence since age 15
Next Topic: KDHS 2022: Table 9.7 Place of delivery
Goto Forum:
  


Current Time: Sat Apr 27 06:54:28 Coordinated Universal Time 2024