Using NHANES and my subpopulation has 39,313 people but when I do a simple svy, subpop(if subpop==1): mean ridageyr the number of subpopulation observations is 37,425 instead of 39,313. I have no missing data on the survey parameter variables (MEC16YR, sdmvstra, sdmstra) or on ridageyr.
. svyset [pweight=MEC16YR], strata(sdmvstra) psu(sdmvpsu) vce(linearized) singleunit(centered)
pweight: MEC16YR
VCE: linearized
Single unit: centered
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
. svy, subpop(if subpop==1): mean ridageyr
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 118 Number of obs = 82,091
Number of PSUs = 241 Population size = 1,415,698,832
Subpop. no. obs = 37,425
Subpop. size = 946,631,143.08
Design df = 123
--------------------------------------------------------------
| Linearized
| Mean Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
ridageyr | 47.36543 .2322556 46.90569 47.82516
--------------------------------------------------------------
Without weights or survey design variables, you can see there is no missing for age:
. mean ridageyr if subpop==1
Mean estimation Number of obs = 39,313
--------------------------------------------------------------
| Mean Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
ridageyr | 50.83229 .0932921 50.64944 51.01515
--------------------------------------------------------------
. svyset [pweight=MEC16YR], strata(sdmvstra) psu(sdmvpsu) vce(linearized) singleunit(centered)
pweight: MEC16YR
VCE: linearized
Single unit: centered
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
. svy, subpop(if subpop==1): mean ridageyr
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 118 Number of obs = 82,091
Number of PSUs = 241 Population size = 1,415,698,832
Subpop. no. obs = 37,425
Subpop. size = 946,631,143.08
Design df = 123
--------------------------------------------------------------
| Linearized
| Mean Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
ridageyr | 47.36543 .2322556 46.90569 47.82516
--------------------------------------------------------------
Without weights or survey design variables, you can see there is no missing for age:
. mean ridageyr if subpop==1
Mean estimation Number of obs = 39,313
--------------------------------------------------------------
| Mean Std. Err. [95% Conf. Interval]
-------------+------------------------------------------------
ridageyr | 50.83229 .0932921 50.64944 51.01515
--------------------------------------------------------------
Comment