View source: R/GeneratePedigree.R
| GeneratePedigree | R Documentation |
Function to simulate pedigree of given individual to first cousins and back to grandparents
GeneratePedigree(age, sex, keep_future_children = TRUE)
age |
numeric, age of index case |
sex |
character, patient sex; either "M" or "F" |
keep_future_children |
logical, whether to keep (TRUE) or remove (FALSE) children not yet born; default is TRUE |
This function simulates pedigrees of individuals given age and sex. Family sizes are based on appropriate US census data, and due to correlation between number of children within pedigrees, this starts with assigning overall pedigree size to small, average, or large.
Children for each adult are generated using the SimulateChildren function.
a data frame representing the family, where each row represents a person and columns represent attributes:
numeric, person age
character, person sex; either "M" or "F"
character, person's relationship to index
character, which family member person is child of; NA for grandparents
Katelyn Queen kqueen@mednet.ucla.edu
Schweizer and Guzzo. Distributions of Age at First Birth, 1960-2018 (2020); https://www.bgsu.edu/ncfmr/resources/data/family-profiles/schweizer-guzzo-distribution-age-first-birth-fp-20-11.html
Khandwala, Zhang, Lu, and Eisenberg. The age of fathers in the USA is rising: an analysis of 168 867 480 births from 1972 to 2015, Human Reproduction, Volume 32, Issue 10, October 2017, Pages 2110–2116, https://doi.org/10.1093/humrep/dex267
GeneratePedigree(age = 35, sex = "M")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.