The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » India » Making complex estimations
Re: Making complex estimations [message #24777 is a reply to message #24761] Sat, 09 July 2022 01:18 Go to previous messageGo to previous message
captain is currently offline  captain
Messages: 2
Registered: July 2022
Member
Janet-DHS wrote on Wed, 06 July 2022 16:54
Following 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.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Need help on Table 11.16 and 11.17 National Report 2019-20 India
Next Topic: Line Number in the BR file
Goto Forum:
  


Current Time: Fri Nov 22 14:40:28 Coordinated Universal Time 2024