I found an unexpected result when analyzing ABES data. I am using Stata/SE 15.1, but this issue occurs in Stata 17 too.
It seems that I can not upload the dataset with this post. The dataset can be downloaded freely from https://www.cdc.gov/healthyyouth/data/abes/data.htm.
Declare survey design for dataset
The upper limit of the prevelance of QN35 among male(Q2=2) is 0.1625.
When I changed with format(%9.3f) option,the upper limit shows 0.162, NOT 0.163 as expected.
I wonder someone can double check this issue.
Solved ! Thank daniel klein for his kind help!
The default results without format option:
It seems that I can not upload the dataset with this post. The dataset can be downloaded freely from https://www.cdc.gov/healthyyouth/data/abes/data.htm.
Declare survey design for dataset
HTML Code:
svyset psu [pweight=weight], strata(stratum)
HTML Code:
. svy ,subpop(if Q2==2): prop QN35, cformat(%9.4f) (running proportion on estimation sample) -------------------------------------------------------------- | Linearized Logit | Proportion std. err. [95% conf. interval] -------------+------------------------------------------------ QN35 | 1 | 0.1392 0.0109 0.1188 0.1625 2 | 0.8608 0.0109 0.8375 0.8812 --------------------------------------------------------------
When I changed with format(%9.3f) option,the upper limit shows 0.162, NOT 0.163 as expected.
HTML Code:
. svy ,subpop(if Q2==2): prop QN35, cformat(%9.3f) (running proportion on estimation sample) -------------------------------------------------------------- | Linearized Logit | Proportion std. err. [95% conf. interval] -------------+------------------------------------------------ QN35 | 1 | 0.139 0.011 0.119 0.162 2 | 0.861 0.011 0.838 0.881 --------------------------------------------------------------
Solved ! Thank daniel klein for his kind help!
The default results without format option:
Code:
. svy ,subpop(if Q2==2): prop QN35 (running proportion on estimation sample) Survey: Proportion estimation Number of strata = 16 Number of obs = 7,448 Number of PSUs = 70 Population size = 7,452.8028 Subpop. no. obs = 3,421 Subpop. size = 3,553.611 Design df = 54 -------------------------------------------------------------- | Linearized Logit | Proportion std. err. [95% conf. interval] -------------+------------------------------------------------ QN35 | 1 | .1392273 .0108637 .1188397 .1624676 2 | .8607727 .0108637 .8375324 .8811603 --------------------------------------------------------------
Comment