Re: Making complex estimations [message #24777 is a reply to message #24761] |
Sat, 09 July 2022 01:18 |
captain
Messages: 2 Registered: July 2022
|
Member |
|
|
Janet-DHS wrote on Wed, 06 July 2022 16:54Following is a response from DHS Research & Data Analysis Director, Tom Pullum:
A tab command can include "if" and "summarize" (see tabsum), although only iweights and fweights work with summarize.
If you have a variable that takes the values 0 and 1, multiply it by 100 to get a variable that takes the values 0 and 100. The mean of that variable will be a percentage. For example, say you want the percentage of urban women (v025=1) who are using modern contraception, by combinations of region (v024) age in 5-year intervals (v013). You could do this (note that the MCPR is the pct of women with v502=1 who have v313=3):
gen mcpr_01=0 if v502==1
replace mcpr_01=1 if v502==1 & v313==3
gen mcpr_100=mcpr_01*100
format *_100 %6.1f
tab v024 v013 if v025==1 [iweight=v005], summarize(mcpr_100) means noobs
This is an example of a tabulation that includes four variables. I don't have time to give an example for the specific variables you are asking about, but the pattern in this example may help.
Tom, thank you for your greatly informative reply and also for the illustrative example which was quite helpful. However, there is a problem. For India 2015-16's individual recode (women), the variable for mobile ownership status of the respondent is not provided although "S930" is present if you type "label list S930" which is basically the mobile ownership status but it hasn't been turned into a proper variable.
Can you help me with this? I am trying to calculate the percentage of never-married women aged 20-24 who don't own their own personal mobile by state.
|
|
|