exampleKrakow {BookEKM} | R Documentation |
For a specific example, detailed in Krakow Sep 1 course, P(M|Hp) and P(M|Hd) are calculated. The conditional likelihoods are done using conditionalLikelihoods and the genotype probabilities, i.e., P(g1,g2) are found using the FamiliasPosterior wrapper mix3Familias. The function indicates how other cases are handled.
exampleKrakow(p, R, theta, M, c, d)
p |
Allele frequencies, real vector |
R |
Mutation rate, real in [0,1]. Default Familias model is used |
theta |
Kinship coefficient, real in [0,1]. |
M |
Integer vector, subset of 1,2,3,4 for this function. |
c |
Dropin parameter, real in [0,1] |
d |
Drop-out. A real vector with two numbers for this function. |
lik.p |
P(M|Hp) |
lik.d |
P(M|Hd) |
LR |
P(M|Hp)/P(M|Hd) |
Thore Egeland
See Krakow talks.
#Homework require(Familias) require(paramlink) p <- c(0.01,0.01,0.01,0.97) #allele frequencies R <- 0 #mutation rate theta <- 0 #kinship parameter M <- c(1,2,3) #Mixture c <- 0.0 #dropin parameter d <- c(0.0,0.0) #drop-out parameters for the two contributors exampleKrakow(p, R, theta, M, c,d)