Skip to contents

This function calculates and summarizes the adequacy of specified indicator ratios by year, evaluating the consistency of key health indicators across districts. It computes the percentage of districts meeting the adequacy criteria for each indicator ratio, based on the specified range.

Usage

calculate_district_ratios_summary(
  .data,
  ratio_pairs = list(ratioAP = c("anc1", "penta1"), ratioPP = c("penta1", "penta3"),
    ratioOO = c("opv1", "opv3"), ratioPPcv = c("penta1", "pcv1"), ratioPR = c("penta1",
    "rota1")),
  adequate_range = c(1, 1.5)
)

Arguments

.data

A data frame containing indicator data by district and year. The data frame should include all indicators specified in ratio_pairs.

ratio_pairs

A named list where each element represents a pair of indicators for ratio calculation. The default pairs are:

  • "ratioAP": ANC1 to PENTA1 (i.e., anc1/penta1)

  • "ratioPP": PENTA1 to PENTA3 (i.e., penta1/penta3)

  • "ratioOO": OPV1 to OPV3 (i.e., opv1/opv3)

adequate_range

A numeric vector of length 2 that specifies the lower and upper bounds for adequacy. Ratios within this range will be flagged as adequate. Default is c(1, 1.5).

Value

A tibble of class cd_district_ratios_summary, containing the summary of adequacy checks by year. Each column represents the percentage of districts meeting the adequacy criteria for the specified ratio, with overall metrics included for data interpretation and quality monitoring.

Details

  • The function dynamically calculates ratios between the specified indicator pairs.

  • For each year, it computes the percentage of districts where the calculated ratio for each indicator pair falls within the adequate range.

  • The summary table aids in monitoring indicator consistency across districts and over time, providing insights into areas where health service delivery may vary.

Examples

if (FALSE) { # \dontrun{
  # Calculate adequacy summary for ANC1/Penta1 and other indicator ratios
  calculate_district_ratio_summary(cd_data)
} # }