get_twinmat_qb: 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_qb(df_ped = qb[["df_ped"]])

Arguments

df_ped

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

df_kinder

A dataframe containing information on the type of certificate (required to exclude siblings having their baptism on the same day from being classified as twins)

Examples

1
2
twinmat <- get_twinmat()
str(twinmat)

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