Using weights correctly

Hi there,

I am using the Brazilian microdata from 4 four different census years to create municipal-level variables. I have read the forum threads and blog post that explain the weight variables. I would like to make sure I am using the weights (PERWT and HHWT) correctly when creating these variables. I believe the weight variables show how many people (PERWT) or households (HHWT) that individual or household represents at the municipal level, correct?

  1. For calculating the share of people in each municipality by race, I am adding up the weights (PERWT) for all the people (races white, black, brown, indigenous, asian, and unknown) in that municipality and year. This total is the denominator for calculating my share of people by race. The enumerator for white, for example, is the sum of weights (PERWT) for all people whose race is marked as white. I used the same reasoning on variable AGE2 to calculate the shares of people in each age group.

  2. For calculating the average number of births per woman in each municipality and year, I did sum(CHBORN*PERWT)/sum(PERWT) for each municipality and year.

  3. Four household-level variables such as URBAN, ELECTRIC and WATSUP, I kept only observations where PERNUM=1, and added up the weights (HHWT) for all answers yes and no by municipality and year, to create a total weight. The share of urban households in each municipality and year is the sum of weights for households marked as urban, divided by the total weight variable mentioned above.

I would appreciate your revision and confirmation! Thank you.

On another note, the variable MORTNUM has a lot of missing values. Should those be treated as zeros?

Thank you,
Stephanie

1 Like

It looks like you are using weights properly, both for household and person weights. For (2) make sure you’re only restricting the sample to women of childbearing age.

I’ll note that any statistical software package will allow you to automatically use the weights in your calculation, without requiring you to multiply the variable by the weight. But the result will be the same.

Regarding MORTNUM, this is only available in 2010. It will be missing for all other years. Is it missing for some households in 2010? Also note on the comparability page that for the 2010 Brazil sample, this just indicates whether a household had a death, not the number of deaths.