The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Other countries » Namibia 2013
Namibia 2013 [message #3805] Sun, 15 February 2015 02:52 Go to next message
imup is currently offline  imup
Messages: 3
Registered: February 2015
Location: sweden
Member
Hi,

I am using the dataset from Namibia 2013.I would like to know how to reproduce the table 17.7.1 and 17.7.2of fasting blood glucose testing. The data set have 6 columns for blood glucose level with a lot of missing/notavailable data in the household part regarding that.(I am using R).
reply much appreciated.


Never stop learning

[Updated on: Sun, 15 February 2015 03:12]

Report message to a moderator

Re: Namibia 2013 [message #3835 is a reply to message #3805] Sat, 21 February 2015 13:11 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 788
Registered: January 2013
Senior Member
The key variable you need to use is sh336k which holds the blood glucose level. The missing values come for a number of reasons:
1) Blood glucose is only collected in a subsample of households. All members in households not selected for the sample will have a missing value.
2) Blood glucose is only collected for women and men age 35-64. All members other than those age 35-64 will have a missing value.
3) Blood glucose is only collected for women and men age 35-64 who consent to being tested. All other will have missing data.

The values in sh336k are recoded into the 4 groups presented in the tables. sh336k contains values per decilitre (dl) rather than per litre as shown in the table, so the recoding is into the following groups: 0-38 = below normal, 39-60 = normal, 61-69 = prediabetic, 70-222 = elevated, other higher values are consider invalid as are excluded.

Below is some simple code in R for tabulating the data:
install.packages("foreign")
install.packages("survey")
install.packages("car")
library(foreign)
library(survey) 
library(car)

dta <- read.dta("C:/Data/DHS_stata/NMPR60FL.dta", convert.factors = FALSE)

dta$bg<-factor(recode(dta$sh336k,"0:38='1 below normal';39:60='2 normal';61:69='3 prediabetic';70:222='4 elevated';else=NA"))
dta$sex <-factor(recode(dta$hv104,"1='1 Male';2='2 Female';else=NA"))

DHSdesign<-svydesign(id=dta$hv021, strata=dta$hv022, weights=dta$hv005/1000000, data=dta)
bg.table <- svytable(~sex+bg, DHSdesign)
bg.table
prop.table(bg.table,1)*100
margin.table(bg.table,1)

The output results should look like:
> bg.table
          bg
sex        1 below normal   2 normal 3 prediabetic 4 elevated
  1 Male        111.24863  967.97756      76.83102   65.28731
  2 Female       79.05747 1570.28125     133.86968   89.82786
> prop.table(bg.table,1)*100
          bg
sex        1 below normal  2 normal 3 prediabetic 4 elevated
  1 Male         9.108702 79.255078      6.290692   5.345528
  2 Female       4.220819 83.836137      7.147202   4.795842
> margin.table(bg.table,1)
sex
  1 Male 2 Female 
1221.345 1873.036 

Re: Namibia 2013 [message #3848 is a reply to message #3835] Tue, 24 February 2015 09:01 Go to previous messageGo to next message
imup is currently offline  imup
Messages: 3
Registered: February 2015
Location: sweden
Member
Thanks thats very helpful.
however, I still don't get why many columns e.g. blood glucose sh336k there are sh336k.1sh336k.2...sh336k.6, is it different sample/visits for the same respondent or different samples from different members in the same household.?if so how do i figure which is for which?
I want to merge that with HIV results from HIV set but still I don't know how to explain the columns in the household set to get Male/female and BMI for example in R.

reply very much appreciated


Never stop learning
Re: Namibia 2013 [message #3850 is a reply to message #3848] Tue, 24 February 2015 12:05 Go to previous messageGo to next message
imup is currently offline  imup
Messages: 3
Registered: February 2015
Location: sweden
Member
Thanks alot that was very helpful.

Never stop learning

[Updated on: Tue, 24 February 2015 12:45]

Report message to a moderator

Re: Namibia 2013 [message #4003 is a reply to message #3850] Mon, 16 March 2015 19:59 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 788
Registered: January 2013
Senior Member
I think you are looking at the household recode dataset, rather than the person's recode dataset. In the household recode dataset, there are entries for sh336k for up to 7 different household members - no household in the survey had more than 7 men and women age 35-64 who were eligible for the blood glucose test. In the person's recode dataset there is one record per person, and only one variable sh336k. See my example above, that tabulates sh336k by sex.
Previous Topic: DR-Congo
Next Topic: Burundi 2010 - HIV knowledge questions in male but not individual dataset (couples instead)
Goto Forum:
  


Current Time: Thu Apr 18 01:55:11 Coordinated Universal Time 2024