fert_mac: Compute mean age at childbearing (mac) from age-specific...

View source: R/fert_helper_functions_wpp.R

fert_macR Documentation

Compute mean age at childbearing (mac) from age-specific fertility rates

Description

This function computes the mean age at childbearing from the age-specific fertility rates of a given period.

Usage

fert_mac(fert_data_age, byvar)

Arguments

fert_data_age

data frame. columns "age_start" and "age_span" describe age group of mother and "value" is age-specific fertility rates in births per woman.

byvar

character. string of column names in fert_data_age by which mac will be computed.

Details

accomodates any width of age interval (age_span) so long as it is constant over age.

Value

a data frame with mean age at childbearing in the "value" field, computed by byvar columns.

Author(s)

Sara Hertog


markalava/ccmppWPP documentation built on April 21, 2022, 12:36 a.m.