The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Reproductive Health » Confidence Interval for Median duration of abstinence (Calculation of Confidence Interval for Median duration of abstinence)
Confidence Interval for Median duration of abstinence Fri, 07 February 2020 09:14
 alam.sayeef Messages: 1Registered: February 2020 Member
I want to calculate the confidence interval of the median duration of postpartum abstinence. The variable is given in months (whole numbers).

Method 1: SUMMARIZE, detail
PROS - Calculation by category/strata is feasible.
CONS - the confidence interval so produced is not in decimal since data is not considered as normal.

SYNTAX

by por, sort: summarize m8, detail

OUTPUT

------------------------------------------------------------ ------------------------------------------------------------ -------------------
-> por = Urban

duration of abstinence
------------------------------------------------------------ -
Percentiles Smallest
1% 0 0
5% 1 0
10% 1 0 Obs 35,523
25% 2 0 Sum of Wgt. 35,523

50% 3 Mean 20.01053
Largest Std. Dev. 35.44062
75% 7 98
90% 96 98 Variance 1256.038
95% 96 98 Skewness 1.670594
99% 96 98 Kurtosis 3.817338

------------------------------------------------------------ ------------------------------------------------------------ -------------------
-> por = Rural

duration of abstinence
------------------------------------------------------------ -
Percentiles Smallest
1% 0 0
5% 1 0
10% 1 0 Obs 116,567
25% 2 0 Sum of Wgt. 116,567

50% 3 Mean 20.76323
Largest Std. Dev. 36.31985
75% 7 98
90% 96 98 Variance 1319.131
95% 96 98 Skewness 1.583656
99% 98 98 Kurtosis 3.531344

Method 2: TABSTAT
PROS - Calculation by category/strata is feasible.
CONS - the confidence interval so produced is not in decimal since data is not considered as normal.

SYNTAX

tabstat m8, stat(median) by(por)

OUTPUT

Summary for variables: m8
by categories of: por (Place of Residence)

por | p50
-------+----------
Urban | 3
Rural | 3
-------+----------
Total | 3
------------------

Method 2: CENTILE
PROS - The ci produced is in the desired format due to the consideration of variable as normally distributed
CONS - Calculation by category/strata is not feasible.

SYNTAX

centile m8, n

OUTPUT

-- Normal, based on observed centiles --
Variable | Obs Percentile Centile [95% Conf. Interval]
-------------+---------------------------------------------- ---------------
m8 | 152,090 50 3 2.743866 3.256134

Please let me know how to get ci in decimals (i.e. normally distributed) and also by category/strata
 Previous Topic: Number of children at first contraceptive use Next Topic: Adolescent Childbearing
Goto Forum:

Current Time: Wed May 12 10:54:23 Coordinated Universal Time 2021