The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » create a weighted population variable
create a weighted population variable [message #24504] Wed, 25 May 2022 06:49 Go to previous message
marghetambu is currently offline  marghetambu
Messages: 1
Registered: May 2022
Member
Hi,

I merged all the individual files(men and women) of all the African countries. I created a variable "perwt" which containes the variable v005/1000000 for women and mv005 (reweighted using the procedure described here https://userforum.dhsprogram.com/index.php?t=msg&goto=13 158&S=Google).
Moreover, I generated a variable "population" equal to 1 for all the individuals.
I aggregate all the observations at province/year level and I create the variable "population_sum" as the weighted sum (population*weights). However, since the weights are decimals, the aggregate population variable obtained contains decimal numbers.
How can I obtain a weighted variable "population" which calculates all the individuals interviewed in a specific province and in a specific year?
Thank you so much.

Have a nice day!
 
Read Message
Read Message
Previous Topic: M_h data for Myanmar, M_h & M data for Pakistan
Next Topic: Weighting after pooling multiple countries
Goto Forum:
  


Current Time: Mon Apr 29 09:52:04 Coordinated Universal Time 2024