 The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Reproductive Health » Calculating Confidence Interval
Calculating Confidence Interval Thu, 28 November 2019 23:29 zahrohrana Messages: 2Registered: October 2019 Member
Hi there,

I would like to get advice on how to calculate confidence interval using the value that is saved locally. I am currently looking at the inequalities in cesarean section. I am trying to see if there are any differences in cesarean section rates by different place of birth, socioeconomic status, place of residence, region, and maternal education. I am trying to calculate this difference in terms of ratio and difference measures, relative and absolute inequalities respectively. The calculation of rate difference is done, for example by subtracting cesarean section rate of the poorest by the richest, while rate ratio is done by dividing cesarean section rate of the richest by the poorest.

This sounds like a pretty straightforward process, but I am currently having difficulties in producing the 95% confidence interval of the difference and ratio estimates of each inequality measure.

Currently I managed to produce the ratio value by using the following commands on Stata:

```//RATIO CALCULATION PLACE OF BIRTH
recode m15 (20/29=0 "public sector") (30/39=1 "private sector") (10/19=2 "home") (96=2 "other") (99=3 "missing"), gen(birth_place)

//Private Facility
svy: tab birth_place v401 if bidx==1 & b5==1 & birth_place==1, per
matrix list e(Prop)
matrix cs_private=e(Prop)
local cs_private1=cs_private[1,2]
display `cs_private1'

//Public Facility
svy: tab birth_place v401 if bidx==1 & b5==1 & birth_place==0, per
matrix list e(Prop)
matrix cs_public=e(Prop)
local cs_public1=cs_public[1,2]
display `cs_public1'

//Ratio
local ratio_est=`cs_private1'/`cs_public1'
display `ratio_est'```

I am aware that we can calculate ratio measure with confidence interval with this command: rationame: varname/varname. But this will need to be calculated using a variable name instead of a value name. I am wondering if there is anyway to produce the confidence interval using the value saved locally? Any advice on this?

I am new on Stata and will appreciate any help on this.

Thank you.

Regards,
Rana
 Previous Topic: Calculating Median Ages Next Topic: delivery assistance syntax spss, nepal 2016.
Goto Forum:

Current Time: Mon Jun 14 19:29:20 Coordinated Universal Time 2021