LRmoments2 {BookEKM} | R Documentation |
Exact numerical calculation.
LRmoments2(p = c(0.5, 0.5), kappaP = c(0, 1, 0),kappaD = c(1, 0, 0),logg=FALSE, base =exp(1))
p |
Allele frequencies |
kappaP |
Probabilities of 0,1 and 2 alleles IBD corresponding to pedigree for HP |
kappaD |
Probabilities of 0,1 and 2 alleles IBD corresponding to pedigree for HD |
logg |
If |
base |
Base for log transform |
moments |
expectation, standard deviation and skewness of LR under HP and HD |
LRtable |
Distribution of LR under HP and HD |
Thore Egeland Thore.Egeland@gmail.com
Slooten and Egeland (2013, submitted)
require(paramlink) LRmoments2(kappaP=c(0,1,0)) #Motivating example ## Not run: data(db) p=db[db$Marker=="VWA",]$Freq LRmoments2(p=p,kappaP=c(0,1,0)) ## End(Not run) #Log example x <- 0.1 res <- LRmoments2(kappaP=c(0,1,0), p = c(x,1-x),logg=TRUE) #Exact logE <- function(x) { term1 <- x^3*log(1/x)+2*x^2*(1-x)*log(1/(2*x))+2*x*(1-x)^2*log(1/(2-2*x)) term2 <- x*(1-x)*log(1/(4*x*(1-x)))+(1-x)^3*log(1/(1-x)) term1+term2 } round(res$moments[1],15)==round(logE(x),15)