Skip to contents

Returns the 3 x 3 matrix \(P[z + 1, s + 1] = P(IBS = s | IBD = z)\) for a SNP with X copies of one allele and Y of the other among T nonmissing alleles, including the ascertainment correction of Purcell et al. (2007), Table 1.

Usage

morie_p_ibs_given_ibd(X, Y, T)

Arguments

X, Y

Allele counts, X + Y == T.

T

Total nonmissing alleles, at least 4.

Value

A 3 x 3 matrix, rows indexed by IBD state 0, 1, 2.

References

Purcell, S. et al. (2007). PLINK. American Journal of Human Genetics, 81(3), 559-575, Table 1.

Examples

morie_p_ibs_given_ibd(X = 2, Y = 2, T = 4)
#>           [,1]      [,2]      [,3]
#> [1,] 0.3333333 0.0000000 0.6666667
#> [2,] 0.0000000 0.6666667 0.3333333
#> [3,] 0.0000000 0.0000000 1.0000000