The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Mortality » Git Hub Coding Versus My Code for Tetanus Vaccine Status
Re: Git Hub Coding Versus My Code for Tetanus Vaccine Status [message #20495 is a reply to message #20489] Thu, 12 November 2020 09:00 Go to previous messageGo to previous message
Shireen-DHS is currently offline  Shireen-DHS
Messages: 140
Registered: August 2020
Location: USA
Senior Member

Dear Dr. Hussain,

I believe you copied the wrong code from our GitHub site. You also should be using the IR file for this indicator not the KR or BR file.
From the RH_ANC.do file for this indicator, we have:

//tetnaus toxoid injections
recode m1_1 (0 1 8 9 . = 0 "No") (1/7 = 1 "Yes"), gen(rh_anc_toxinj)
replace rh_anc_toxinj = . if age>=period
label var rh_anc_toxinj "Received 2+ tetanus injections during last pregnancy"


The age and period variables are constructed from the RH_age_period.do file. Age is the age of the five and period here is defined as the last five years before the survey. For some indicators the estimate is reported in the last 3 years or last 2 years (check the final report) so we create the variable period so the user can only change it one time. So for IR files it is:
gen age = v008 - b3_01
*if you have b19 in the file you need to use that for age instead so age would be : age=b19_01 .
*only recent surveys have b19
gen period = 60
* 60 is 5 years in months

This is all explained in the main file for chapter 9. The RH_age_period.do file should be run first before running the other do files.
https://github.com/DHSProgram/DHS-Indicators-Stata/tree/mast er/Chap09_RH

Thank you.

Best,

Shireen Assaf
The DHS Program



 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Preceding sibling survival status
Next Topic: Comparison Between Birth weight Variable m19 & m18
Goto Forum:
  


Current Time: Tue May 14 17:58:26 Coordinated Universal Time 2024