The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Missing data
Re: Missing data [message #14886 is a reply to message #14856] Fri, 11 May 2018 11:29 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member

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

It would be good if you (and other forum users) could always say what survey you are using. Like your question, my answer is generic. Cases with the "not applicable" code should be omitted from any analysis. Usually they will be omitted automatically, because a blank or a dot is not numeric and can't be included in calculations. Cases with missing value codes should also be omitted, and that must be done explicitly with an "if" or "select" statement. It is not a good idea to drop them from the file, because then you lose cases that are non-missing on other variables you may want to analyze in the same run. It is best to construct a new variable with a new name. For example, with hw70 you could call the recode "hw70r" or "HAZ". In Stata I would do something like this to go from hc70 (the name in the PR file) to stunted:

gen stunted=0
replace stunted=1 if hc70<-200
replace stunted=. if hc70<-600 | hc70>600
summarize stunted [iweight=hv005/1000000] if hv103==1
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: table replication
Next Topic: Discrepancy in stunting, wasting, underweight prevalence for Nepal DHS 2001
Goto Forum:
  


Current Time: Mon Dec 2 01:41:36 Coordinated Universal Time 2024