An R Package for Extended Behavior Genetics Analysis
Convert Sparse Relationship Matrices to Kinship Links for one Matrix
Process a GEDCOM Tag
Process Event Lines (Birth or Death)
Process Parents Information from GEDCOM Data
Read a GEDCOM File
Read Wiki Family Tree
Recodes Sex Variable in a Pedigree Dataframe
Repair Missing IDs
Repair Parent IDs
Repairs Sex Coding in a Pedigree Dataframe
Resample Elements of a Vector
rmvn
Simulate Pedigrees This function simulates "balanced" pedigrees based ...
sliceFamilies
Split GEDCOM Lines into Individual Blocks
Standardize Column Names in a Dataframe (Internal)
Summarize the families in a pedigree
Function to summarize the originating members for each line
Summarize the maternal lines in a pedigree
Function to summarize the oldest individuals in a pedigree
Summarize the paternal lines in a pedigree
Summarize Pedigree Data
Trace paths between individuals in a family tree grid
modified tryCatch function
validate_and_convert_matrix
vech Create the half-vectorization of a matrix
Create a properly formatted parent row for the pedigree
addPersonToPed
Add addRowlessParents
Generate or Adjust Number of Kids per Couple Based on Mating Rate
Apply Tag Mappings to a Line
Assign Couple IDs
BGmisc: An R Package for Extended Behavior Genetics Analysis
Process Generation Connections
Parse Tree
Process Generations for Pedigree Simulation
calcAllGens A function to calculate the number of individuals in each ...
calcFamilySize A function to calculate the total number of individuals...
calcFamilySizeByGen An internal supporting function for `simulatePedig...
Confidence Intervals for Correlations with Optional Design-Effect Adju...
Falconer's Formula
Calculate Relatedness Coefficient
Function to calculate summary statistics for all numeric variables Thi...
Validates and Optionally Repairs Unique IDs in a Pedigree Dataframe
Check for duplicated individual IDs
Validates and Optionally Repairs Parent IDs in a Pedigree Dataframe
Check Parental Role Sex Consistency
Validate Pedigree Network Structure
Validates and Optionally Repairs Sex Coding in a Pedigree Dataframe
Check for within-row duplicates (self-parents, same mom/dad)
collapse Names
Convert Sparse Relationship Matrices to Kinship Links
Combine Columns
comp2vech Turn a variance component relatedness matrix into its half-v...
Compute Parent Adjacency Matrix with Multiple Approaches
Make Long Tree
Count GEDCOM Pattern Rows
Create Data Frame for Generation
Deduplicate pairs of IDs in a data frame
Determine Sex of Offspring
Construct Adjacency Matrix for Parent-Child Relationships Using Beta M...
Construct Adjacency Matrix for Parent-Child Relationships Using Direct...
Construct Adjacency Matrix for Parent-Child Relationships Using Indexe...
Construct Adjacency Matrix for Parent-Child Relationships
Assign parent values based on component type
collapse Names
Convert Sparse Relationship Matrices to Kinship Links
Convert Pedigree Matrices to Related Pairs File (Legacy)
Combine Columns
Compute the transpose multiplication for the relatedness matrix
Check for Pattern Rows
Extract Information from Line
Fisher's r to z transformation and back
Fisher's r to z transformation and back
Get the Modal Value of a Vector
Load or compute the inverse diagonal matrix
Load or compute the isChild matrix
Load or compute the isPar matrix
parent-child adjacency data
Assign momID and dadID based on family mapping
Create a mapping of family IDs to parent IDs
Post-process GEDCOM Data Frame
Process a GEDCOM Tag
Process parents information
Read a GEDCOM File
dropLink
Error Function
Extract Information from Line
Match Members
Function to find the biggest families in a pedigree This function find...
Function to find the most extreme individuals in a pedigree This funct...
Function to find the originating member for each line
Function to find the oldest individuals in a pedigree This function fi...
fitComponentModel Fit the estimated variance components of a model to ...
Build adjacency list (4-way neighbors)
Extract Summary Text
identifyComponentModel Determine if a variance components model is ide...
Infer Relatedness Coefficient
initialize_empty_df
Initialize checkpoint files
Initialize an Empty Individual Record
evenInsert A function to insert m elements evenly into a length n vect...
Determine isChild Status, isChild is the 'S' matrix from RAM
Load or compute a checkpoint
makeInbreeding
makeTwins
Assign momID and dadID based on family mapping
Create a Mapping from Family IDs to Parent IDs
Mark and Assign children
Compute the null space of a matrix
nullToNA
Parse a GEDCOM Individual Block
Parse Name Line
infer relationship from tree template
Take a pedigree and turn it into an additive genetics relatedness matr...
Take a pedigree and turn it into an extended environmental relatedness...
Take a pedigree and turn it into a common nuclear environmental matrix
Take a pedigree and turn it into a relatedness matrix
Segment Pedigree into Extended Families
Take a pedigree and turn it into a generation relatedness matrix
Turn a pedigree into a graph
Add a maternal line ID variable to a pedigree
Take a pedigree and turn it into a mitochondrial relatedness matrix
Add a paternal line ID variable to a pedigree
Assign Parent
Post-process GEDCOM Data Frame
Function to prepare the pedigree for summarization This function prepa...
Provides functions for behavior genetics analysis, including variance component model identification [Hunter et al. (2021) <doi:10.1007/s10519-021-10055-x>], calculation of relatedness coefficients using path-tracing methods [Wright (1922) <doi:10.1086/279872>; McArdle & McDonald (1984) <doi:10.1111/j.2044-8317.1984.tb00802.x>], inference of relatedness, pedigree conversion, and simulation of multi-generational family data [Lyu et al. (2024) <doi:10.1101/2024.12.19.629449>]. For a full overview, see [Garrison et al. (2024) <doi:10.21105/joss.06203>].
Useful links