Dear all,
I have a problem on calculating confidence intervals for proportions over groups. The groups in my research is 'nhom'.
When I use the option 'over', Stata shows me the results that are different than when I use if 'nhom'==0 or 'nhom'==1 as you can see from the codes below.
I wonder I did something wrong. Could you help me to see my mistakes and explain why?
Thank you so much in advance!
I have a problem on calculating confidence intervals for proportions over groups. The groups in my research is 'nhom'.
When I use the option 'over', Stata shows me the results that are different than when I use if 'nhom'==0 or 'nhom'==1 as you can see from the codes below.
I wonder I did something wrong. Could you help me to see my mistakes and explain why?
Code:
. tab nhom Nhom | benh/tu | vong | Freq. Percent Cum. ------------+----------------------------------- Tu vong | 149 2.99 2.99 Benh/tat | 4,838 97.01 100.00 ------------+----------------------------------- Total | 4,987 100.00 . proportion gioi, over(nhom) level(95) Proportion estimation Number of obs = 4987 Nam: gioi = Nam Nu: gioi = Nu _subpop_1: nhom = Tu vong _subpop_2: nhom = Benh/tat -------------------------------------------------------------- Over | Proportion Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ Nam | _subpop_1 | .557047 .0408314 .4762113 .6349701 _subpop_2 | .4772633 .0071818 .4632056 .4913571 -------------+------------------------------------------------ Nu | _subpop_1 | .442953 .0408314 .3650299 .5237887 _subpop_2 | .5227367 .0071818 .5086429 .5367944 -------------------------------------------------------------- . proportion gioi if nhom==1, level(95) Proportion estimation Number of obs = 4838 -------------------------------------------------------------- | Proportion Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ gioi | Nam | .4772633 .0071818 .4632055 .4913572 Nu | .5227367 .0071818 .5086428 .5367945 -------------------------------------------------------------- . proportion gioi if nhom==0, level(95) Proportion estimation Number of obs = 149 -------------------------------------------------------------- | Proportion Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ gioi | Nam | .557047 .0408314 .475564 .6355714 Nu | .442953 .0408314 .3644286 .524436 --------------------------------------------------------------
Comment