Calculate District Adequacy Summary
Source:R/1a_checks_ratios.R
calculate_district_ratios_summary.Rd
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.
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.