| Title: | Calculates Demographic Indicators |
|---|---|
| Description: | Calculates key indicators such as fertility rates (Total Fertility Rate (TFR), General Fertility Rate (GFR), and Age Specific Fertility Rate (ASFR)) using Demographic and Health Survey (DHS) women/individual data, childhood mortality probabilities and rates such as Neonatal Mortality Rate (NNMR), Post-neonatal Mortality Rate (PNNMR), Infant Mortality Rate (IMR), Child Mortality Rate (CMR), and Under-five Mortality Rate (U5MR), and adult mortality indicators such as the Age Specific Mortality Rate (ASMR), Age Adjusted Mortality Rate (AAMR), Age Specific Maternal Mortality Rate (ASMMR), Age Adjusted Maternal Mortality Rate (AAMMR), Age Specific Pregnancy Related Mortality Rate (ASPRMR), Age Adjusted Pregnancy Related Mortality Rate (AAPRMR), Maternal Mortality Ratio (MMR) and Pregnancy Related Mortality Ratio (PRMR). In addition to the indicators, the 'DHS.rates' package estimates sampling errors indicators such as Standard Error (SE), Design Effect (DEFT), Relative Standard Error (RSE) and Confidence Interval (CI). The package is developed according to the DHS methodology of calculating the fertility indicators and the childhood mortality rates outlined in the "Guide to DHS Statistics" (Croft, Trevor N., Aileen M. J. Marshall, Courtney K. Allen, et al. 2018, <https://dhsprogram.com/Data/Guide-to-DHS-Statistics/index.cfm>) and the DHS methodology of estimating the sampling errors indicators outlined in the "DHS Sampling and Household Listing Manual" (ICF International 2012, <https://dhsprogram.com/pubs/pdf/DHSM4/DHS6_Sampling_Manual_Sept2012_DHSM4.pdf>). |
| Authors: | Mahmoud Elkasabi |
| Maintainer: | Mahmoud Elkasabi <[email protected]> |
| License: | GPL-2 |
| Version: | 0.9.2 |
| Built: | 2026-06-07 08:39:38 UTC |
| Source: | https://github.com/cran/DHS.rates |
Example for a DHS data of births.
ADBR70ADBR70
A data frame with 2753 rows and 8 variables:
Women individual sample weight
Year of interview
Date of interview (CMC)
Primary sampling unit
Sample strata for sampling error
Type of residence urban/rural
Date of birth (CMC)
Age at death
https://dhsprogram.com/data/available-datasets.cfm
admort returns adult mortality indicators such as the Age Specific Mortality Rate (ASMR),
Age Adjusted Mortality Rate (AAMR), Age Specific Maternal Mortality Rate (ASMMR),
Age Adjusted Maternal Mortality Rate (AAMMR), Age Specific Pregnancy Related Mortality Rate (ASPRMR),
Age Adjusted Pregnancy Related Mortality Rate (AAPRMR), Maternal Mortality Ratio (MMR) and Pregnancy Related Mortality Ratio (PRMR).
admort returns the Standard Error (SE), exposure (N), weighted exposure (WN),
Design Effect (DEFT), Relative Standard Error (RSE), and Confidence Interval (CI).
admort( Data.Name, Indicator, JK = NULL, CL = NULL, Strata = NULL, Cluster = NULL, Weight = NULL, Date_of_interview = NULL, PeriodEnd = NULL, Period = NULL )admort( Data.Name, Indicator, JK = NULL, CL = NULL, Strata = NULL, Cluster = NULL, Weight = NULL, Date_of_interview = NULL, PeriodEnd = NULL, Period = NULL )
Data.Name |
The DHS women (IR) dataset or data from other survey with the same format. |
Indicator |
Type of indicator to be calculated ("asmr", "aamr", "asmmr", "aammr", "asprmr", "aaprmr", "mmr", "prmr", "aagfr"). |
JK |
"Yes" to estimate Jackknife SE for AAMR, AAMMR, AAPRMR, MMR and PRMR. |
CL |
Confidence level to calculate the Confidence Coefficient Z of the Confidence Intervals; default if 95. |
Strata |
Stratification variable if other than "v022". |
Cluster |
Sample cluster variable if other than "v021". |
Weight |
Survey weight variable if other than "v005". |
Date_of_interview |
Date of Interview (CMC) variable if other than "v008". |
PeriodEnd |
The end of the exposure period in YYYY-MM format; default is the date of the survey. |
Period |
The study period for fertility in months; default is 36 months (3 years). |
Mortality indicators (ASMR, AAMR, ASMMR, AAMMR, ASPRMR, AAPRMR, MMR, PRMR and AAGFR), and precision indicators (SE, DEFT, RSE, and CI).
Mahmoud Elkasabi.
Example for a DHS data based on all women.
AWIR70AWIR70
A data frame with 3024 rows and 27 variables:
Women individual sample weight
Year of interview
Date of interview (CMC)
Date of birth (CMC)
Primary sampling unit
Sample strata for sampling error
Type of residence urban/rural
Date of birth (CMC) birth 1
Date of birth (CMC) birth 2
Date of birth (CMC) birth 3
Date of birth (CMC) birth 4
Date of birth (CMC) birth 5
Date of birth (CMC) birth 6
Date of birth (CMC) birth 7
Date of birth (CMC) birth 8
Date of birth (CMC) birth 9
Date of birth (CMC) birth 10
Date of birth (CMC) birth 11
Date of birth (CMC) birth 12
Date of birth (CMC) birth 13
Date of birth (CMC) birth 14
Date of birth (CMC) birth 15
Date of birth (CMC) birth 16
Date of birth (CMC) birth 17
Date of birth (CMC) birth 18
Date of birth (CMC) birth 19
Date of birth (CMC) birth 20
https://dhsprogram.com/data/available-datasets.cfm
chmort returns childhood mortality rates such as the Neonatal Mortality Rate (NNMR),
Post-neonatal Mortality Rate (PNNMR), Infant Mortality Rate (IMR), Child Mortality Rate (CMR),
and Under-5 Mortality Rate (U5MR)
chmort returns the Standard Error (SE), mortality exposure (N), weighted exposure (WN),
Design Effect (DEFT), Relative Standard Error (RSE), and Confidence Interval (CI).
chmort( Data.Name, JK = NULL, CL = NULL, Strata = NULL, Cluster = NULL, Weight = NULL, Date_of_interview = NULL, Date_of_birth = NULL, Age_at_death = NULL, PeriodEnd = NULL, Period = NULL, Class = NULL )chmort( Data.Name, JK = NULL, CL = NULL, Strata = NULL, Cluster = NULL, Weight = NULL, Date_of_interview = NULL, Date_of_birth = NULL, Age_at_death = NULL, PeriodEnd = NULL, Period = NULL, Class = NULL )
Data.Name |
The DHS births (BR) dataset or data from other survey with the same format. |
JK |
"Yes" to estimate Jackknife SE. |
CL |
Confidence level to calculate the Confidence Coefficient Z of the Confidence Intervals; default if 95. |
Strata |
Stratification variable if other than "v022". |
Cluster |
Sample cluster variable if other than "v021". |
Weight |
Survey weight variable if other than "v005". |
Date_of_interview |
Date of Interview (CMC) variable if other than "v008". |
Date_of_birth |
Child date of birth (CMC) variable if other than "b3". |
Age_at_death |
Child age at death (in months) variable if other than "b7". |
PeriodEnd |
The end of the exposure period in YYYY-MM format; default is the date of the survey. |
Period |
The study period for mortality in months; default is 60 months (5 years). |
Class |
Allow for domain level indicators. |
Childhood mortality rates (NNMR, PNNMR, IMR, CMR, and U5MR), and precision indicators (SE, RSE, and CI).
Mahmoud Elkasabi.
# Calculate five-year children mortality rates based on ADBR70 data data("ADBR70") chmort( ADBR70, JK = "Yes" ) # Calculate ten-year children mortality rates based on ADBR70 data data("ADBR70") chmort( ADBR70, JK = "Yes", Period = 120 ) # The exposure period ends in June 2011 data("ADBR70") chmort( ADBR70, PeriodEnd = "2011-06" )# Calculate five-year children mortality rates based on ADBR70 data data("ADBR70") chmort( ADBR70, JK = "Yes" ) # Calculate ten-year children mortality rates based on ADBR70 data data("ADBR70") chmort( ADBR70, JK = "Yes", Period = 120 ) # The exposure period ends in June 2011 data("ADBR70") chmort( ADBR70, PeriodEnd = "2011-06" )
chmortp returns weighted childhood component death probabilities for 8 age segments 0, 1-2, 3-5, 6-11,
12-23, 24-35, 36-47, and 48-59 months
chmort returns weighted and unweighted number of deaths and children-years exposure.
chmortp( Data.Name, Weight = NULL, Date_of_interview = NULL, Date_of_birth = NULL, Age_at_death = NULL, PeriodEnd = NULL, Period = NULL, Class = NULL )chmortp( Data.Name, Weight = NULL, Date_of_interview = NULL, Date_of_birth = NULL, Age_at_death = NULL, PeriodEnd = NULL, Period = NULL, Class = NULL )
Data.Name |
The DHS births (BR) dataset or data from other survey with the same format. |
Weight |
Survey weight variable if other than "v005". |
Date_of_interview |
Date of Interview (CMC) variable if other than "v008". |
Date_of_birth |
Child date of birth (CMC) variable if other than "b3". |
Age_at_death |
Child age at death (in months) variable if other than "b7". |
PeriodEnd |
The end of the exposure period in YYYY-MM format; default is the date of the survey. |
Period |
The study period for mortality in months; default is 60 months (5 years). |
Class |
Allow for domain level indicators. |
Childhood component death probabilities.
Mahmoud Elkasabi.
# Calculate childhood component death probabilities based on ADBR70 data data("ADBR70") chmortp( ADBR70 )# Calculate childhood component death probabilities based on ADBR70 data data("ADBR70") chmortp( ADBR70 )
Example for a DHS data based on ever-married women.
EMIR70EMIR70
A data frame with 3014 rows and 30 variables:
Women individual sample weight
Year of interview
Date of interview (CMC)
Date of birth (CMC)
Primary sampling unit
Sample strata for sampling error
Type of residence urban/rural
All woman factor - total
All woman factor - urban/rural
All woman factor - regional
Date of birth (CMC) birth 1
Date of birth (CMC) birth 2
Date of birth (CMC) birth 3
Date of birth (CMC) birth 4
Date of birth (CMC) birth 5
Date of birth (CMC) birth 6
Date of birth (CMC) birth 7
Date of birth (CMC) birth 8
Date of birth (CMC) birth 9
Date of birth (CMC) birth 10
Date of birth (CMC) birth 11
Date of birth (CMC) birth 12
Date of birth (CMC) birth 13
Date of birth (CMC) birth 14
Date of birth (CMC) birth 15
Date of birth (CMC) birth 16
Date of birth (CMC) birth 17
Date of birth (CMC) birth 18
Date of birth (CMC) birth 19
Date of birth (CMC) birth 20
https://dhsprogram.com/data/available-datasets.cfm
fert returns fertility indicators such as the Total Fertility Rate (TFR),
General Fertility Rate (GFR), and Age Specific Fertility Rate (ASFR)
fert returns the Standard Error (SE), fertility exposure (N), weighted exposure (WN),
Design Effect (DEFT), Relative Standard Error (RSE), and Confidence Interval (CI).
fert( Data.Name, Indicator, JK = NULL, CL = NULL, Strata = NULL, Cluster = NULL, Weight = NULL, Date_of_interview = NULL, Woman_DOB = NULL, EverMW = NULL, AWFact = NULL, PeriodEnd = NULL, Period = NULL, Class = NULL )fert( Data.Name, Indicator, JK = NULL, CL = NULL, Strata = NULL, Cluster = NULL, Weight = NULL, Date_of_interview = NULL, Woman_DOB = NULL, EverMW = NULL, AWFact = NULL, PeriodEnd = NULL, Period = NULL, Class = NULL )
Data.Name |
The DHS women (IR) dataset or data from other survey with the same format. |
Indicator |
Type of indicator to be calculated ("tfr", "gfr", "asfr"). |
JK |
"Yes" to estimate Jackknife SE for TFR. |
CL |
Confidence level to calculate the Confidence Coefficient Z of the Confidence Intervals; default if 95. |
Strata |
Stratification variable if other than "v022". |
Cluster |
Sample cluster variable if other than "v021". |
Weight |
Survey weight variable if other than "v005". |
Date_of_interview |
Date of Interview (CMC) variable if other than "v008". |
Woman_DOB |
Woman date of birth (CMC) variable if other than "v011". |
EverMW |
"Yes" for ever-married women data. |
AWFact |
All-women factor variable in case of EverMW = “Yes”. |
PeriodEnd |
The end of the exposure period in YYYY-MM format; default is the date of the survey. |
Period |
The study period for fertility in months; default is 36 months (3 years). |
Class |
Allow for domain level indicators. |
Fertility indicators (TFR, GFR, or ASFR), and precision indicators (SE, DEFT, RSE, and CI).
Mahmoud Elkasabi.
# Calculate TFR and estimate Jackknife SE based on all women AWIR70 data data("AWIR70") Total_Fertility_Rate <- fert( AWIR70, Indicator = "tfr", JK = "Yes" ) # Calculate GFR and estimate SE based on ever-married women EMIR70 data data("EMIR70") General_Fertility_Rate <- fert( EMIR70, Indicator = "gfr", EverMW = "YES", AWFact = "awfactt" ) # Calculate Urban/Rural level ASFR and estimate SE based on all women AWIR70 data data("AWIR70") Age_Specific_Fertility_Rate <- fert( AWIR70, Indicator = "asfr", Class = "v025" )# Calculate TFR and estimate Jackknife SE based on all women AWIR70 data data("AWIR70") Total_Fertility_Rate <- fert( AWIR70, Indicator = "tfr", JK = "Yes" ) # Calculate GFR and estimate SE based on ever-married women EMIR70 data data("EMIR70") General_Fertility_Rate <- fert( EMIR70, Indicator = "gfr", EverMW = "YES", AWFact = "awfactt" ) # Calculate Urban/Rural level ASFR and estimate SE based on all women AWIR70 data data("AWIR70") Age_Specific_Fertility_Rate <- fert( AWIR70, Indicator = "asfr", Class = "v025" )