calculateBlockDiagonal2PhiMatrix: Kinship matrix of a known pedigree structure

Description Usage Arguments Value References

View source: R/learnFamilyBasedPGMs.R

Description

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.

Usage

1
2
calculateBlockDiagonal2PhiMatrix(ped, squaredRoot = FALSE,
  sampled = NULL)

Arguments

ped

A data.frame with with the pedigrees of the families, with columuns famid, id, dadid, momid, and sex for all sampled and non-sampled subjects.

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.

Value

The kinship matrix 2 \bmΦ or its squared root, if squaredRoot is TRUE.

References

\insertAllCited
adele/FamilyBasedPGMs documentation built on Feb. 16, 2021, 8:29 a.m.