This function converts raw outcome data to risk metrics based on population data and model cases sample mean.

covert_raw_to_risk(object, outcomes_raw, model_cases_sample_mean)

Arguments

object

An object containing UK population data.

outcomes_raw

A data frame containing raw outcome data.

model_cases_sample_mean

A data frame containing model cases sample mean.

Value

A data frame with calculated risk metrics for each age group and outcome.

Details

The function performs the following steps:

  • Extracts population and age group data from the input object.

  • Defines helper functions to check the completeness of data and calculate risk per infection.

  • Checks that each outcome has data for all age groups.

  • Combines raw outcomes data with model cases data and population data.

  • Calculates the risk per infection for each outcome and age group.

Examples

if (FALSE) { # \dontrun{
  result <- covert_raw_to_risk(object, outcomes_raw, model_cases_sample_mean)
  print(result)
} # }