Re: Village mean sanitation [message #23426 is a reply to message #23358] |
Tue, 14 September 2021 07:45  |
Bridgette-DHS
Messages: 3230 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).
|
|
|