The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Family Planning in young women (STATA use)
Re: Family Planning in young women [message #18014 is a reply to message #17974] Fri, 16 August 2019 14:23 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

It is definitely preferable to use the subpop option. However, in your situation I would use these lines:

gen v013_1=1 if v013==1
gen v013_2=1 if v013==2
svy, subpop(v013_1), tab
svy, subpop(v013_2), tab

I think this will take care of the problem. In the specification of subpop you need to use an argument (what goes between the parentheses) that is 1 for v013=1 or for v013=2.
 
Read Message
Read Message
Previous Topic: Duplicated label categories
Next Topic: 2017 Ghana Maternal Health Survey
Goto Forum:
  


Current Time: Tue Dec 24 08:16:17 Coordinated Universal Time 2024