The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Create a variable using Percentage from cross tabulation
Create a variable using Percentage from cross tabulation [message #23655] Wed, 27 October 2021 14:00 Go to next message
salamin is currently offline  salamin
Messages: 5
Registered: September 2021
Member
If I wish to tabulate wealth index by region using svy command. How can I save proportion of poor households in all division in a single variable?
Re: Create a variable using Percentage from cross tabulation [message #23662 is a reply to message #23655] Thu, 28 October 2021 15:41 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3016
Registered: February 2013
Senior Member

Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

What survey? What do you want to be the cases? The possibilities are households (the HR file), individuals in households (the PR file), women (the IR file), men (the MR file), or children (the KR file). The variable names for regions, the wealth quintiles, and the weights are different in different files. Apparently you are using Stata. You CAN use a full svyset command with the tab command, but the only part that actually matters for a crosstab is the weight variable, and you can include that with just the weight option.

If, say, you wanted to get the percentage distribution of households across wealth quintiles, for all regions, you could open the HR file and enter this command: "tab hv024 hv270 [iweight=hv005/1000000], row" .

Re: Create a variable using Percentage from cross tabulation [message #23669 is a reply to message #23662] Fri, 29 October 2021 12:12 Go to previous messageGo to next message
salamin is currently offline  salamin
Messages: 5
Registered: September 2021
Member
Thank you for your response and however, please allow me to rephrase the question. Once we create the table using "tab hv024 hv270 [iweight=hv005/1000000], row" command, how can I generate a variable that will save the row percentages for lowest quantile for each region?

Re: Create a variable using Percentage from cross tabulation [message #23671 is a reply to message #23669] Fri, 29 October 2021 16:05 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3016
Registered: February 2013
Senior Member

Following is another response from DHS Research & Data Analysis Director, Tom Pullum:

I still don't understand. Do you want to save the table, so you can print it out? Do you want to collapse the data into a very short file in which the cells of the cross tab are the cases? You cannot construct a variable, in an individual-level file, that is equal to a percentage in a table. Can you say more about what you are trying to analyze?

Previous Topic: Adjusting survey weights in melogit in Stata
Next Topic: Using Normalized Weight in Analysis
Goto Forum:
  


Current Time: Thu Mar 28 12:41:49 Coordinated Universal Time 2024