create_iycf_quality_report: Create IYCF Quality Report

View source: R/create_iycf_quality_report.R

create_iycf_quality_reportR Documentation

Create IYCF Quality Report

Description

This function creates a summary report of indicators on an IYCF dataset to help an analyst evaluate the quality of the data. This function also calls the healthyr::create_plausibility_report function to add columns for plausibility penalties and categorization.

Usage

create_iycf_quality_report(
  df,
  grouping = NULL,
  short_report = NULL,
  file_path = NULL,
  exp_prevalence_mad = NULL,
  exp_sex_ratio = NULL,
  exp_ratio_under6m_6to23m = NULL
)

Arguments

df

Inputs a dataframe which has already been processed and standardized by the healthyr::format_nut_health_indicators function.

grouping

Inputs an optional character value specifying a column name by which to group the results.

short_report

Inputs a boolean value TRUE or FALSE to return just key variables. If FALSE, returns a dataframe of all the variables calculated.

file_path

Inputs an optional character value specifying a file_path to save an xlsx copy of the results.

exp_prevalence_mad

Input for a numeric value on the expected prevalence of the Minimum Acceptable Diet (MAD) indicator. If no value is given, a default of 0.3 is used. It is highly recommended to look at DHS, MICS, SMART or other health surveys from the area to determine a realistic value.

exp_sex_ratio

Input for a numeric value of the expected sex ratio (male : female) of children 6-23 months in the population. If no value is given, a default of 1 is used.

exp_ratio_under6m_6to23m

Input for a numeric value of the expected ratio of children under 6 months of age to children 6-23 months of age. If no value is given, a default of 0.33 is used assuming roughly 25% of children are under 6 months out of all children under 2 years of age.

Value

Returns a dataframe summarized overall or at the specified grouping level, of several key quality indicators, and plausibility penalties and categorization.

Examples

## Not run: create_iycf_quality_report(df, grouping = "enum",
file_path = "myreports/iycf_report.xlsx", exp_prevalence_mad = 0.12, exp_sex_ratio = 1.1)
## End(Not run)

SaeedR1987/healthyr documentation built on July 4, 2023, 11:17 p.m.