View source: R/learnFamilyBasedPGMs.R
| calculateBlockDiagonal2PhiMatrix | R Documentation |
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\Phi, in which \bm \Phi = diag\{\Phi^{(f)}, f=1,\ldots,F\} and
each entry \Phi^{(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, \Phi^{(f)}_{ii} = 1/2,
\Phi^{(f)}_{ij} = 1/4 if i and j are siblings or if one of them is a parent of the other,
\Phi^{(f)}_{ij} = 1/8 if one of them is a grand-parent of the other, and so on
\insertCitelange2003mathematicalFamilyBasedPGMs.
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 |
sampled |
A logical vector in which element i indicates whether individual i was sampled or not. |
The kinship matrix 2 \bm\Phi 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.