The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Why I am getting different total observations when using iweight for tabulating a variable
Why I am getting different total observations when using iweight for tabulating a variable [message #26098] Tue, 07 February 2023 12:48 Go to previous message
sujata is currently offline  sujata
Messages: 18
Registered: May 2019
Member
I am trying to tabulate the hv025 variable in the PR file for the Indian state of Punjab. Applying svyset and tabulating this variable only gives the proportions and not the absolute values. I understand that svy: ta hv025 and ta hv025 [iw=shweight/1000000] will give the same results if we are not interested in standard errors. But the total observation (67913.878) differs from 67856 (the total number of observations). I am putting here both the results. 67913.878 is the population size. How is the population size different from the number of observations (68549)? If I apply aweight then I am getting the Total as equal to the total number of observations, which is 68549. But I should use iweight and not aweight.

gen weight_dis=shweight/1000000

ta hv025 [iw= weight_dis]

type of |
place of |
residence | Freq. Percent Cum.
------------+-----------------------------------
urban |26,122.0845 38.46 38.46
rural | 41,791.793 61.54 100.00
------------+-----------------------------------
Total | 67,913.878 100.00


svyset [pw= weight_dis], psu( hv021) strata( hv022)

svy:ta hv025
(running tabulate on estimation sample)

Number of strata = 88 Number of obs = 68,549
Number of PSUs = 915 Population size = 67,913.878
Design df = 827

----------------------
type of |
place of |
residence | proportion
----------+-----------
urban | .3846
rural | .6154
|
Total | 1
----------------------
Key: proportion = Cell proportion

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multilevel model with region random effects
Next Topic: Response rate and weights
Goto Forum:
  


Current Time: Sun Dec 1 14:57:03 Coordinated Universal Time 2024