create a weighted population variable [message #24504] |
Wed, 25 May 2022 06:49  |
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!
|
|
|