The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Haz weighted mean
Re: Haz weighted mean [message #7012 is a reply to message #7009] Mon, 10 August 2015 14:00 Go to previous messageGo to previous message
Reduced-For(u)m
Messages: 292
Registered: March 2013
Senior Member


I think you are confusing two types of weights here. The DHS weights are essentially "probability" weights that re-weight the sample to be representative. In the mapping you describe, I think you want "frequency" weights - you want the marker/circle size to be bigger if there are more observations, yes?

In that case, you want to weight by the number of observations, so all you have to do is count them up. You can do this with a "collapse" command if that is how you are calculating cluster-level averages (see the Stata help file for collapse), or you can use an "egen" command such as:

egen N_obs = count(HAZ), by(clusterid)

Is that what you wanted to do? If you wanted to show the "relative weight" that each cluster was getting as your marker size, you could do about what you described:

even map_weight = sum(old_weight), by(clusterid)

These should be very similar (as in, the ratio of the sum of weights between two clusters will be fairly close to the ratio of the number of observations).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Tool used to measure children under 2
Next Topic: child nutrition BDHS-2011
Goto Forum:
  


Current Time: Thu Apr 25 13:22:56 Coordinated Universal Time 2024