Skip to contents
q1 <- 0.4
p1 <- c(q1^2, 2*q1*(1-q1), (1-q1)^2)
sum(p1)
#> [1] 1
q2 <- 0.3
p2 <- c(q2^2, 2*q2*(1-q2), (1-q2)^2)
sum(p2)
#> [1] 1
# t: trace sample
# r: reference sample
calc_LRs_wTwR(xT = c(0, 0), xR = c(0, 0), wT = 1e-2, wR = 1e-6, p = list(p1, p2))
#> [1]  6.064807 10.605257
shppars <- get_beta_parameters(mu = 0.1, sigmasq = 0.01)
shppars
#> [1] 0.6 2.4
curve(dbeta05(x, shppars[1], shppars[2]), from = 0, to = 0.5)

calc_LRs_wTwR_integrate_wT(xT = c(0, 0), xR = c(0, 0), 
                           wR = 1e-6, 
                           shape1T_H1 = shppars[1],
                           shape2T_H1 = shppars[2],
                           shape1T_H2 = shppars[1],
                           shape2T_H2 = shppars[2], 
                           p = list(p1, p2),
                           use_mpfr = FALSE)
#> [1] 4.637996 6.996558