Compute total over sex as max of reported total or sum over sex, compute any NA values based on differences, redistribute SexID = 0 across males and females then validate totals over sex.

dd_validate_totals_over_sex_new(data)

Arguments

data

Data to be harmonized

Value

A dataset where Both sexes == Female + Male for each id and SexId.

Details

See the "Validating totals over sex" vignette for more details about this function.

Examples

if (FALSE) {
df <- validate_totals_over_sex_pop
df <- dd_validate_totals_over_sex_new(df)
}