Skip to contents

calculate_completeness_summary computes the yearly percentage of non-missing values across specified indicators, summarizing data completeness for each year. Indicators with missing value flags are identified by a mis_ prefix, representing the completeness of various indicators for each year.

Usage

calculate_completeness_summary(.data)

Arguments

.data

A cd_data object containing indicator data, including columns with the mis_ prefix which represent missing value flags for each indicator.

Value

A cd_missing_summary object containing a tibble. This tibble shows the yearly percentages of non-missing values for each indicator and the average percentage of non-missing values across all indicators per year.

Details

This function aggregates the percentage of non-missing values for each indicator and calculates the overall average completeness across all indicators. This provides a comprehensive view of data availability trends over time.

The function computes non-missing percentages as follows:

  • For each indicator, calculates the mean percentage of non-missing values by year.

  • Calculates additional summaries specifically for vaccination and tracer indicators.

  • Rounds results to two decimal places to maintain readability.

Examples

if (FALSE) { # \dontrun{
  # Calculate the percentage of non-missing values by year for the data
  calculate_completeness_summary(data)
} # }