The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
When individuals share common ancestors, they are genetically related: they are expected to carry some proportion of alleles that are identical by descent. This expectation—called the relatedness coefficient—is central to many areas of genetics, including heritability estimation, pedigree-based modeling, twin and family studies, and the construction of kinship matrices for mixed-effects models.
Understanding relatedness is key for interpreting familial resemblance, controlling for shared genetic structure in statistical models, and simulating or analyzing traits across multigenerational pedigrees. But while the idea that “siblings are 50% related” is familiar, the reasoning behind such numbers—and how to compute them across complex family structures—is less transparent.
This vignette introduces the concept of relatedness from first principles and walks through how it is calculated from pedigree data. It begins with illustrative examples that explain expected relatedness values for familiar relationships using simplified functions. These examples clarify how shared ancestry translates into probabilistic expectations about genetic similarity.
From there, the vignette introduces a general-purpose matrix-based
method for computing pairwise relatedness across pedigrees. Using the
ped2com()
function, we demonstrate how to build additive
genetic relationship matrices under both complete and incomplete
parentage, and we evaluate how different assumptions affect the
resulting estimates. The goal is to provide a clear, rigorous, and
practical guide to computing relatedness in real data.
In some cases, you observe a phenotypic correlation (e.g., height, cognition) between two individuals and want to infer what value of r would be consistent with that correlation under a fixed ACE model
The inferRelatedness
function inverts the equation:
\[ \text{obsR} = r \cdot a^2 + \text{sharedC} \cdot c^2 \]
to solve for:
\[ r = \frac{\text{obsR} - \text{sharedC} \cdot c^2}{a^2} \]
where: - obsR
is the observed phenotypic correlation
between two individuals or groups. - aceA
and
aceC
represent the proportions of variance due to additive
genetic and shared environmental influences, respectively. -
sharedC
is the shared-environment analog to the relatedness
coefficient: it indicates what proportion of the shared environmental
variance applies to this pair (e.g., 1 for siblings raised together, 0
for siblings raised apart).
# Example usage:
# Infer the relatedness coefficient:
inferRelatedness(obsR = 0.5, aceA = 0.9, aceC = 0, sharedC = 0)
#> [1] 0.5555556
In this example, the observed correlation is 0.5, and no shared environmental variance is assumed. Given that additive genetic variance accounts for 90% of trait variance, the inferred relatedness coefficient is approximately 0.556. This reflects the proportion of genetic overlap that would be required to produce the observed similarity under these assumptions.
# Now assume shared environment is fully shared:
inferRelatedness(obsR = 0.5, aceA = 0.45, aceC = 0.45, sharedC = 1)
#> [1] 0.1111111
In this case, the observed phenotypic correlation is still 0.5, and both additive genetic and shared environmental components are assumed to explain 45% of the variance. Because the shared environment is fully shared between individuals (sharedC = 1), much of the observed similarity is attributed to C, leaving only a small portion attributable to genetic relatedness. The function returns an inferred relatedness coefficient of approximately 0.11 — that is, the amount of additive genetic overlap required (under this model) to produce the remaining unexplained correlation after accounting for shared environmental similarity.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.