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

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