Re: Multilevel analysis-Pakistan DHS [message #19298 is a reply to message #19133] |
Fri, 22 May 2020 06:52 |
Frankfeng
Messages: 9 Registered: September 2019
|
Member |
|
|
Hi,
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.
I hope this helps.
|
|
|