agemix.df.maker: Create dataframe for age-mixing calculations.

Description Usage Arguments Details Value Examples

View source: R/Misc/Pre.hhohhoMaxARTFinal.Sim/hho.rsimpacthelper.R View source: R/agemix.df.maker.R

Description

The dataframe that is produced keeps columns from the relationship table and merges them with person-level attributes. A unique id relid for each relationship is generated that combines the unique ID for the male partner first and the female partner second in the relationship.

Usage

1

Arguments

datalist

The datalist that is produced by readthedata

Details

The resulting dataframe is in a long format where each row/observation represents an episode from each relationship. Each relationship episode is represented twice: once for each man in the dataset who was the male partner in that relationship, and once for each woman who was the female partner in the relationship. This allows the user to conduct stratified analyses based on gender. For relationships where there is more than one episode, there will be multiple rows. The order in which the episodes occur are numbered in ascending order with the column episodeorder.

Additional columns generated: agerelform - The age of the person when when the relationship began. In other words, the age at the first episode pagerelform - The age of their partner when the relationship began.

Value

A dataframe

Examples

1
2

wdelva/RSimpactHelp documentation built on Dec. 26, 2019, 3:42 a.m.