Hello,
I am a research student and i am working on my thesis titled " individual and community level socioeconomic associates of Skilled birth attendance in Pakistan". i am using DHS data on STATA software fo this purpose. Can anyone please guide me on how to create community level variable form individual level variables using DHS data on STATA.

I have not use DHS to create community level before, but I have some experience to create community level variable form individual level variables using other datasets on STATA.

1. You can use cross-tab to get the proportion of individual level variables by community if individual level variables are categorical variables. For example, tab community eduction, you will get the proportion of illiteracy/higher education for each community. Copy those results from STATA and then create a new dataset with all community level variables you want and merge it back to the original one (use merge m:1). I would suggest that you use weight in the cross-tab that may be less bias.

2.You can use bysort to get the mean/median or any other infomation of individual level variables by community if individual level variables are continuous variables. And then again create a new dataset with all community level variables you want. This may cost you time to copy and paste infomration for each community. You then can merge it back to the original one.

The information provided on this Web site is not official U.S. Government information and
does not represent the views or positions of the U.S. Agency for International Development or the U.S. Government.