The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » IPUMS Demographic and Health Surveys (IPUMS-DHS)  » Melogit and Weights
Re: Melogit and Weights [message #19635 is a reply to message #19634] Thu, 23 July 2020 10:50
 Trevor-DHS Messages: 788Registered: January 2013 Senior Member
I suspect that the problem is that you do not have constant weights for each PSU. You can check this by summarizing the weight variable by the idhspsu - the minimum and the maximum should be identical in all cases. For example:
```sort idhspsu
by idhspsu: summ weight```
Be warned that the output is going to be very long, and you probably want to capture the output and process it to find if there are PSUs where the weight is not a constant.

An alternative way of doing the same is:
```sort idhspsu
gen dif = 0
replace dif = 1 if idhspsu == idhspsu[_n-1] & weight != weight[_n-1]
browse if dif == 1```
Any case where dif equals 1 indicates a PSU where the weight is not constant.

 Melogit and Weights By: Yawo on Thu, 23 July 2020 10:19 Re: Melogit and Weights By: Trevor-DHS on Thu, 23 July 2020 10:50 Re: Melogit and Weights By: BillC on Thu, 23 July 2020 17:09 Re: Melogit and Weights By: Trevor-DHS on Thu, 23 July 2020 17:19 Re: Melogit and Weights By: Trevor-DHS on Thu, 23 July 2020 17:27 Re: Melogit and Weights By: BillC on Thu, 23 July 2020 17:46 Re: Melogit and Weights By: Trevor-DHS on Thu, 23 July 2020 18:46 Re: Melogit and Weights By: Yawo on Thu, 23 July 2020 19:48 Re: Melogit and Weights By: Yawo on Wed, 05 August 2020 00:16 Re: Melogit and Weights By: Trevor-DHS on Wed, 05 August 2020 11:14 Re: Melogit and Weights By: Yawo on Thu, 06 August 2020 00:40 Re: Melogit and Weights By: Daniel on Wed, 23 September 2020 04:26 Re: Melogit and Weights By: Trevor-DHS on Wed, 23 September 2020 11:38
 Previous Topic: Weights and Strata for Pooled Samples Next Topic: Merging DHS with IPUMS-DHS to get harmonized districts
Goto Forum:

Current Time: Fri Apr 12 11:18:59 Coordinated Universal Time 2024