conditionalLikelihoods {BookEKM} | R Documentation |
The mixture likelihood is calculated conditioned on genotypes. This should correspond to simillar MixKin functionality as implemented previously in Mathematica by Klaas Slooten and described in kinship course in Krakow Sep 1 2015.
conditionalLikelihoods(M, c, p, d, g)
M |
A vector of integers, possibly NULL, corresponding to the mixture |
c |
Drop in parameter, real in [0,1] |
p |
Allele frequencies. |
d |
Drop-out parameters for each contributor |
g |
A matrix with genotypes, one line for each contributor and an even number of columns. |
See mentioned Krakow presentation.
likelihood |
The conditional likelihoods |
p.in.M |
Output for the last two columns of g (see above) giving the probabilities that the alleles are in the mixture |
Thore Egeland
Slooten, Krakow
#Example g1 <- c(1,2);g2 <- c(1,3) d <- c(0.1,0.6);c <- 0.1;p <- c(0.1,0.2,0.3,0.4) datamatrix <- rbind(g1,g2) #The probabilities that alleles 1,2,3,4 are in the mixture: conditionalLikelihoods(M=1:3, c, p, d, datamatrix)$p.in.M M <- list(1:4,1:3,c(1,2,4),c(1,3,4),2:4,1:2,c(1,3),NULL) ll <- NULL for (i in 1:8) ll <- c(ll,conditionalLikelihoods(M[[i]], c, p, d, datamatrix)$likelihood) ll #likelihoods for the mixtures considered