The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » Tuberculosis variable
Tuberculosis variable [message #19845] Wed, 19 August 2020 22:21 Go to next message
j_lewis98 is currently offline  j_lewis98
Messages: 7
Registered: July 2020
Member
In the SADHS 2016 Adult Health recode file, there is a variable for when the last time you were told to have TB. I want to create a variable for recent TB (told in the past 12 months: with 0 coded as not having TB and 1 coded as having recent TB). How can I do this in STATA?

Thanks!

Jadene
Re: Tuberculosis variable [message #19860 is a reply to message #19845] Fri, 21 August 2020 14:08 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3215
Registered: February 2013
Senior Member

Please tell us the name of the data file (for example, ZAIR71FL.dta, although I don't see such a variable in that file) and the name of the variable.
Re: Tuberculosis variable [message #19861 is a reply to message #19860] Fri, 21 August 2020 14:11 Go to previous messageGo to next message
j_lewis98 is currently offline  j_lewis98
Messages: 7
Registered: July 2020
Member
Hi,
The file names are ZAAHM71FL and ZAAHW71FL- the adult health recode files for men and women in the SADHS 2016 dataset

Kind regards
Re: Tuberculosis variable [message #19869 is a reply to message #19861] Mon, 24 August 2020 08:02 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3215
Registered: February 2013
Senior Member

Following is a response from DHS Research & Data Analysis Director, Tom Pullum:


To find the TB variables in this file I entered "lookfor TB". Three variables come up:

s1410 byte %8.0g S1410 has a doctor or nurse told that you had tb
s1411 byte %8.0g S1411 last time were told to have tb
s1412 byte %8.0g S1412 did get treatment for tb

To look at the labels and the distributions, enter these lines:

label list S1410
label list S1411
label list S1412
tab1 s1410-s142,m 

Variables s1411 and s1412 only apply to the persons who respond "yes" to s1410.  If "No" or "Don't Know" on s1411, then they are NA for s1411 and s1412 and have a dot (".") code on those variables. Here is the value label for s1411:

. label list S1411
S1411:
           1 in the last 12 months
           2 more than 12 months ago

The variable label is poor.  I assume that the correct variable label for s1411 would be "last time were told you had tb".  It appears to me that all you want to do is to change code 2 to code 0. There are many ways to do this but here is one:

gen s1411r=s1411
replace s1411r=0 if s1411==2

label define S1411R 0 "more than 12 months ago" 1 "in the last 12 months"
label values s1411r S1411R
Re: Tuberculosis variable [message #19870 is a reply to message #19869] Mon, 24 August 2020 08:25 Go to previous message
j_lewis98 is currently offline  j_lewis98
Messages: 7
Registered: July 2020
Member
Hi,

Thanks for the response but it did not address my question.

I am looking to create a recent TB variable with 0 as not having TB and 1 as having RECENT TB.
Previous Topic: Strata, PSU, weights for Peru Continuous Survey
Next Topic: Strata, PSU, weights for Sengal Continuous Survey
Goto Forum:
  


Current Time: Sat Dec 28 08:57:06 Coordinated Universal Time 2024