ASFR-weighted mean of the mid-points x + 0.5 of the completed-age intervals, as in INE's methodology.

mean_age_at_childbearing(asfr_df)

Arguments

asfr_df

Output of age_specific_fertility_rate().

Value

A tibble with nuts3_code, province_name, year, mac (years).

Examples

asfr <- tibble::tibble(
  nuts3_code = "ES111", province_name = "A Coruna", year = 2023,
  age = c(20, 30), asfr = c(0.03, 0.08), asfr_female = c(0.015, 0.04)
)
mean_age_at_childbearing(asfr)
#> # A tibble: 1 × 4
#>   nuts3_code province_name  year   mac
#>   <chr>      <chr>         <dbl> <dbl>
#> 1 ES111      A Coruna       2023  27.8