expand_data: Create derived variables for birth-level data

View source: R/data.R

expand_dataR Documentation

Create derived variables for birth-level data

Description

This function adds new columns to the birth level data, i.e.:

  • age the age of the mother at each birth (in years)

  • parity the rank of a given birth within the life history of a mother

  • PP whether the mother go on reproducing after a given birth

  • IBI the interbirth interval between a given birth and the next one (in months)

Usage

expand_data(birth_level_data)

Arguments

birth_level_data

the dataset to expand

Details

These new columns are derived from existing columns and are required for the fit of statistical models.

Value

a tibble

Examples

expand_data(data_births_all)


courtiol/twinR documentation built on July 11, 2024, 12:04 a.m.