The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in SPSS » Prevalence of disability and associated risk factors
Re: Prevalence of disability and associated risk factors [message #10655 is a reply to message #10650] Fri, 26 August 2016 07:22 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3087
Registered: February 2013
Senior Member
Another response from Tom Pullum:

The command in Stata to get the percentage distribution for sh24 in table 2.14, and the total of 35,226 is the following:

use UGPR60FL.dta
tab sh24 [iweight=hv005/1000000] if hv105>=5 & hv105<96 & hv103==1

Here I am excluding cases with hv105>=96, which are basically missing on age. This gives a total of 35,226 weighted cases. Same for sh25 through sh29.

I cannot tell you how to construct a stratum variable in SPSS, because I do not use SPSS. In Stata it would be egen stratum=group(hv024 hv025). Here is another way to do it that does not use egen and group, which are strictly Stata commands.

If you do "tab hv024 hv025" you will see that there are 10 regions and 2 places of residence. There are not 20 combinations, however, because Kampala is completely urban. There are 19. Try this (translated to Stata): "gen stratum=hv024+9*(hv025-1)". There are other ways to do a recode, but this will give the urban parts of the regions as strata 1-10 and the rural parts, excluding Kampala, as 11-19.
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Missing data is coded?
Next Topic: Using a sub-sample for analysis
Goto Forum:

Current Time: Tue Jun 18 22:06:02 Coordinated Universal Time 2024