The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in SPSS » different samples
different samples [message #9050] Tue, 02 February 2016 09:11 Go to next message
giulia.mandrelli is currently offline  giulia.mandrelli
Messages: 5
Registered: February 2016
Member
In Namibia 2013 data set(dhs survey) I have in the variable "Child's age in months" 1965 valid answers, while in the variable "height/age" only 1558. How can I do if I want a sample of 1558 also in the "child's age in months" variable? I would like to have the same valid answers in all the variables.
Thank you very much in advance
Giulia
Re: different samples [message #9052 is a reply to message #9050] Tue, 02 February 2016 14:40 Go to previous messageGo to next message
Reduced-For(u)m
Messages: 292
Registered: March 2013
Senior Member

An easy way to do it is to generate an indicator variable for "valid height/age" measure, and then just keep those observations ("drop if HAZvalid==0" in Stata). Almost surely all the valid height/age measures have valid ages, and so you would just be trimming away the height/age measures that were invalid (outside acceptable range) or weren't taken (for whatever reason).

But basically all you should have to do is drop the missing HAZ values, and then everyone with a valid HAZ should have a valid age in months.
Re: different samples [message #9057 is a reply to message #9052] Tue, 02 February 2016 16:21 Go to previous messageGo to next message
giulia.mandrelli is currently offline  giulia.mandrelli
Messages: 5
Registered: February 2016
Member
Thank you very much for the reply, but how can I drop the HAz?? I don't know how to do it in SPSS
Re: different samples [message #9058 is a reply to message #9057] Tue, 02 February 2016 20:38 Go to previous messageGo to next message
Reduced-For(u)m
Messages: 292
Registered: March 2013
Senior Member

Perhaps this will help: https://kb.iu.edu/d/afay

"The SELECT command with the SYSMIS() function can drop all missing cases from the current SPSS data set."

It goes on to give the syntax and an example - I think that is probably the right command, but I don't really use SPSS. If you can't make it work, you should google around or check out the SPSS help files on-line.
Re: different samples [message #9061 is a reply to message #9058] Wed, 03 February 2016 07:12 Go to previous messageGo to next message
giulia.mandrelli is currently offline  giulia.mandrelli
Messages: 5
Registered: February 2016
Member
ok thank you so much for your help, i really appreciated
Best regards,
giulia
Re: different samples [message #14740 is a reply to message #9061] Thu, 03 May 2018 04:02 Go to previous message
Hassen
Messages: 121
Registered: April 2018
Location: Ethiopia,Africa
Senior Member
Thank you!!

Hassen Ali(Chief Public Health Professional Specialist)
Previous Topic: Where to begin?
Next Topic: Combining Male and Female datasets
Goto Forum:
  


Current Time: Sun Nov 3 09:33:00 Coordinated Universal Time 2024