The DHS Program User Forum      
Discussions regarding The DHS Program data and results
Home » Countries » Tanzania » Creating year dummy for TDHS for 2010, 2004 and 1996
Creating year dummy for TDHS for 2010, 2004 and 1996 [message #4252] Sat, 25 April 2015 07:04 Go to next message
Robert is currently offline  Robert
Messages: 18
Registered: April 2015
Location: Dar Es Salaam, Tanzania
Member

Dear all
I want to use three round of data set Tanzania Demographic Health Survey for 2010, 2004 and 1996 to investigate the effects of fertility on the health of mothers and children in Tanzania. I want to understand how can somebody create a year dummy and be able to pool these surveys for Tanzania.
Any help?


R.Lihawa
Re: Creating year dummy for TDHS for 2010, 2004 and 1996 [message #4294 is a reply to message #4252] Fri, 01 May 2015 12:16 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 566
Registered: January 2013
Senior Member
For each of the datasets individually (before you pool them), just use something like:
gen year=1996

Alternatively after pooling you can use:
gen year = 0
replace year = 1996 if v007 = 96
replace year = 2004 if v007 = 2004 | v007 = 2005
replace year = 2010 if v007 = 2009 | v007 = 2010

and then check if any are not set by doing
tab v007 year

Previous Topic: How to compute child mortality of different ages
Next Topic: Variable for children education/ enrollment ratio/grade attainment
Goto Forum:
  


Current Time: Tue Apr 24 16:39:23 Eastern Daylight Time 2018