get_twinmat: Wrapper function to return a matrix for twin relations

Description Usage Arguments Examples

Description

This function returns a matrix describing twin relations in the form 'id1-id2-code', where code stands for 1=monozygotous, 2=dizygotous, 3=unknown. Here, zygosity is soley based on sex and therefore only twins of different sex are given code=2 (i.e. dizygotous), while same-sex twins are classified as unknown (code=3). In the case of triplets (and twins of higher order), each individual will have relations to each of his co-twins.

Usage

1
get_twinmat(df_ped = NULL, bspecial_exclude = NULL, bstatus_ok = NULL)

Arguments

df_ped

A dataframe containing the children's birth dates and and the ID of their parents

bspecial_exclude

Possible values of 'bspecial' to exclude as twin births

bstatus_ok

A value of the variabe 'bstatus', which indicates that a birth date is adequately documented. )

Examples

1
2
3
4
## Not run: 
twinmat <- get_twinmat(df_ped, df_kinder)

## End(Not run)

johow/kinlab documentation built on July 5, 2019, 4:23 p.m.