Type: | Package |
Title: | Calculates Demographic Indicators |
Version: | 0.9.2 |
Date: | 2024-01-11 |
Author: | Mahmoud Elkasabi |
Maintainer: | Mahmoud Elkasabi <mahmoudelkasabi@gmail.com> |
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). |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R(≥ 3.4.0) |
Imports: | reshape, survey, stats, haven, matrixStats, dplyr, rlang, crayon |
RoxygenNote: | 7.1.1 |
VignetteBuilder: | knitr |
Suggests: | knitr, rmarkdown |
NeedsCompilation: | no |
Packaged: | 2024-01-11 14:02:15 UTC; mahmo |
Repository: | CRAN |
Date/Publication: | 2024-01-11 15:00:02 UTC |
DHS Births dataset
Description
Example for a DHS data of births.
Usage
ADBR70
Format
A data frame with 2753 rows and 8 variables:
- v005
Women individual sample weight
- v007
Year of interview
- v008
Date of interview (CMC)
- v021
Primary sampling unit
- v022
Sample strata for sampling error
- v025
Type of residence urban/rural
- b3
Date of birth (CMC)
- b7
Age at death
Source
https://dhsprogram.com/data/available-datasets.cfm
DHS All Women dataset
Description
Example for a DHS data based on all women.
Usage
AWIR70
Format
A data frame with 3024 rows and 27 variables:
- v005
Women individual sample weight
- v007
Year of interview
- v008
Date of interview (CMC)
- v011
Date of birth (CMC)
- v021
Primary sampling unit
- v022
Sample strata for sampling error
- v025
Type of residence urban/rural
- b3_01
Date of birth (CMC) birth 1
- b3_02
Date of birth (CMC) birth 2
- b3_03
Date of birth (CMC) birth 3
- b3_04
Date of birth (CMC) birth 4
- b3_05
Date of birth (CMC) birth 5
- b3_06
Date of birth (CMC) birth 6
- b3_07
Date of birth (CMC) birth 7
- b3_08
Date of birth (CMC) birth 8
- b3_09
Date of birth (CMC) birth 9
- b3_10
Date of birth (CMC) birth 10
- b3_11
Date of birth (CMC) birth 11
- b3_12
Date of birth (CMC) birth 12
- b3_13
Date of birth (CMC) birth 13
- b3_14
Date of birth (CMC) birth 14
- b3_15
Date of birth (CMC) birth 15
- b3_16
Date of birth (CMC) birth 16
- b3_17
Date of birth (CMC) birth 17
- b3_18
Date of birth (CMC) birth 18
- b3_19
Date of birth (CMC) birth 19
- b3_20
Date of birth (CMC) birth 20
Source
https://dhsprogram.com/data/available-datasets.cfm
DHS Ever-Married Women dataset
Description
Example for a DHS data based on ever-married women.
Usage
EMIR70
Format
A data frame with 3014 rows and 30 variables:
- v005
Women individual sample weight
- v007
Year of interview
- v008
Date of interview (CMC)
- v011
Date of birth (CMC)
- v021
Primary sampling unit
- v022
Sample strata for sampling error
- v025
Type of residence urban/rural
- awfactt
All woman factor - total
- awfactu
All woman factor - urban/rural
- awfactr
All woman factor - regional
- b3_01
Date of birth (CMC) birth 1
- b3_02
Date of birth (CMC) birth 2
- b3_03
Date of birth (CMC) birth 3
- b3_04
Date of birth (CMC) birth 4
- b3_05
Date of birth (CMC) birth 5
- b3_06
Date of birth (CMC) birth 6
- b3_07
Date of birth (CMC) birth 7
- b3_08
Date of birth (CMC) birth 8
- b3_09
Date of birth (CMC) birth 9
- b3_10
Date of birth (CMC) birth 10
- b3_11
Date of birth (CMC) birth 11
- b3_12
Date of birth (CMC) birth 12
- b3_13
Date of birth (CMC) birth 13
- b3_14
Date of birth (CMC) birth 14
- b3_15
Date of birth (CMC) birth 15
- b3_16
Date of birth (CMC) birth 16
- b3_17
Date of birth (CMC) birth 17
- b3_18
Date of birth (CMC) birth 18
- b3_19
Date of birth (CMC) birth 19
- b3_20
Date of birth (CMC) birth 20
Source
https://dhsprogram.com/data/available-datasets.cfm
Calculates adult and maternal mortality indicators based on survey data.
Description
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).
Usage
admort(
Data.Name,
Indicator,
JK = NULL,
CL = NULL,
Strata = NULL,
Cluster = NULL,
Weight = NULL,
Date_of_interview = NULL,
PeriodEnd = NULL,
Period = NULL
)
Arguments
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). |
Value
Mortality indicators (ASMR, AAMR, ASMMR, AAMMR, ASPRMR, AAPRMR, MMR, PRMR and AAGFR), and precision indicators (SE, DEFT, RSE, and CI).
Author(s)
Mahmoud Elkasabi.
Calculates childhood mortality rates based on survey data.
Description
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).
Usage
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
)
Arguments
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. |
Value
Childhood mortality rates (NNMR, PNNMR, IMR, CMR, and U5MR), and precision indicators (SE, RSE, and CI).
Author(s)
Mahmoud Elkasabi.
Examples
# 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"
)
Calculates the childhood component death probabilities based on survey data.
Description
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.
Usage
chmortp(
Data.Name,
Weight = NULL,
Date_of_interview = NULL,
Date_of_birth = NULL,
Age_at_death = NULL,
PeriodEnd = NULL,
Period = NULL,
Class = NULL
)
Arguments
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. |
Value
Childhood component death probabilities.
Author(s)
Mahmoud Elkasabi.
Examples
# Calculate childhood component death probabilities based on ADBR70 data
data("ADBR70")
chmortp(
ADBR70
)
Calculates fertility indicators based on survey data.
Description
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).
Usage
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
)
Arguments
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. |
Value
Fertility indicators (TFR, GFR, or ASFR), and precision indicators (SE, DEFT, RSE, and CI).
Author(s)
Mahmoud Elkasabi.
Examples
# 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"
)