Description Usage Arguments Value References
View source: R/learnFamilyBasedPGMs.R
Computes the block diagonal kinship matrix with the degree of relatedness between individuals all individuals of F families, multiplied by 2. It is usually denoted as 2 \bmΦ, in which \bm Φ = diag\{Φ^{(f)}, f=1,…,F\} and each entry Φ^{(f)}_{ij} is the probability that two alleles sampled at random from individuals i and j of family f are identical by descent. Thus, when the pedigree structure is known, Φ^{(f)}_{ii} = 1/2, Φ^{(f)}_{ij} = 1/4 if i and j are siblings or if one of them is a parent of the other, Φ^{(f)}_{ij} = 1/8 if one of them is a grand-parent of the other, and so on \insertCitelange2003mathematicalFamilyBasedPGMs.
1 2 | calculateBlockDiagonal2PhiMatrix(ped, squaredRoot = FALSE,
sampled = NULL)
|
ped |
A data.frame with with the pedigrees of the families, with columuns
|
squaredRoot |
a logical value indicating if the square root of the kinship matrix 2 \bmΦ (i.e., the Z matrix) must be computed. |
sampled |
A logical vector in which element i indicates whether individual i was sampled or not. |
The kinship matrix 2 \bmΦ or its squared root, if squaredRoot is TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.