|
Re: Create a variable using Percentage from cross tabulation [message #23662 is a reply to message #23655] |
Thu, 28 October 2021 15:41 |
Bridgette-DHS
Messages: 3199 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 #23671 is a reply to message #23669] |
Fri, 29 October 2021 16:05 |
Bridgette-DHS
Messages: 3199 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?
|
|
|