The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Village mean sanitation (child anthropometry)
Village mean sanitation [message #23358] Fri, 27 August 2021 13:12 Go to next message
chande is currently offline  chande
Messages: 12
Registered: March 2021
Member
the improved sanitation variable is measured by the proportion of households using improved sanitation facility in the village excluding the particular household in consideration. In other words, i want to use village-level (village mean) indicators for sanitation facility to generate exogenous sanitation variable. I want the stata code for this variable.
Re: Village mean sanitation [message #23426 is a reply to message #23358] Tue, 14 September 2021 07:45 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3172
Registered: February 2013
Senior Member

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

Say that for each household you have a binary variable SH that is 1 for improved sanitation and 0 for unimproved ("H" for household). You want to construct a variable SC that is the proportion of households in the cluster for which SH is 1 ("C" for cluster, which you are interpreting as a village). The command you want is "egen SC=mean(SH), by(hv001)". If you are using an India survey, use (by hv024 hv001).

Previous Topic: Missing value labels in HAZ, WHZ and WAZ
Next Topic: Under-5 Children data file Creation
Goto Forum:
  


Current Time: Fri Oct 11 21:16:10 Coordinated Universal Time 2024