The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » matching data with the report
Re: matching data with the report [message #15113 is a reply to message #15089] Tue, 05 June 2018 07:50 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member

Following is a response from Senior DHS Stata Specialist, Tom Pullum:

I can only say how we do this in Stata. Open the KR file (ETKR70FL.dta) and paste the following lines into the command window:

* restrict to children living with the mother
keep if b9==0

* the youngest child will be the one with the lowest value of bidx
sort v001 v002 v003 bidx
egen sequence=seq(), by(v001 v002 v003)

tab sequence bidx,m
keep if sequence==1

Stata has some "egen" ("extensions to generate") commands that are very helpful. This one, "seq()", as used here, will sequence the children who have the same mother (identified with v001 v002 v003) in the order of bidx. This is used AFTER the KR file has been reduced to children who are living with the mother (no need to do a separate check on whether they are alive), given with b9=0. If SPSS does not have a command similar to seq(), you will have to find some other way to do this. Perhaps another SPSS user can help.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Anthropometry_Ethiopia_2011DHS
Next Topic: SPA data set related question
Goto Forum:
  


Current Time: Sat Dec 21 21:46:51 Coordinated Universal Time 2024