Check if population counts by sex are equal to population counts for both sexes and adjust in case of any difference. Criteria: If Female Population + Male Population is different from the population for Both sexes, then Both sexes = Female + Male
dd_validate_totals_over_sex(data)
Data to be harmonized
A dataset where Both sexes == Female + Male for each id and SexId.
See the "Validating totals over sex" vignette for more details about this function.
if (FALSE) {
df <- validate_totals_over_sex
df <- dd_validate_totals_over_sex(df)
}