Description Usage Arguments Details Examples
See Equation and p. 25-26 and Eq. (6.14) in Egeland, Kling, Mostad (2015)
1 | likPO(p, M, AF, CH)
|
p |
Vector of allele frequencies |
M |
Mutation matrix |
AF |
Genotype of father |
CH |
Genotype of child |
Alleles are assumed to be integers 1,2 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ### Example p. 26 Egeland, Kling, Mostad (2015)
# Function:
a = 1; b = 2; cc = 3; d = 4 # renumbered alleles compared to p. 26
AF = c(a, b); CH = c(cc, d)
pc = 0.25; pd = 0.097826; pa = 0.25; pb = 1- pa - pd - pc
p = c(pa, pb, pc, pd)
library(pedmut) # To make mutation matrix only
M = mutationMatrix(model = "proportional", alleles = 1:4,
afreq = p, rate = m)
l1 = likPO(p, M, AF, CH)
library(pedprobr)
PO = nuclearPed(father = "AF", children = "CH")
am = matrix(ncol = 2, c(1, 0, 3, 2, 0, 4))
rownames(am) = labels(PO)
la = list(afreq = p, alleles = 1:4, mutmod = "proportional",
rate = m, name ="L1")
PO = setMarkers(PO,locusAttributes = la, alleleMatrix = am)
l2 = likelihood(PO,1)
abs(l1-l2) < 1e-15
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.