LRimp {BookEKM} | R Documentation |
The function is only used for a specific example. See section 5.3 and exercise
LRimp(res, K = 2, t = 0:10, seed = 123)
res |
data.frame. Output from LRpair, first element in list |
K |
integer. Number of pairs of markers |
t |
numerical vector. Thresholds for which exceedance probabilities should be calculated |
seed |
Integer |
Exceedance probabilities
Thore Egeland
"Relationship Inference with Familias and R. Statistical Methods in Forensic Genetics" by T Egeland, D Kling and P Mostad
require(paramlink) require(IBDsim) require(DNAprofiles) ## Not run: # The below takes a few minutes require(DNAprofiles) ped <- nuclearPed(2, sex = c(1, 2)) ped <- addOffspring(ped, mother = 4, noffs = 1) ped <- addOffspring(ped, father = 5, noffs = 1) res <- LRpair(p = c(0.5, 0.5), rho = 0.29, ped = ped,H1 = c(6, 1), H2 = c(6, 3)) t <- 0:10 K1 <- 1000 K2 <- 4000 q1000 <- LRimp(res, K = K1, t = t) q4000 <- LRimp(res, K = K2, t = t) mu <- 0.00027984 sd<- 0.02394239 q1000.approx <- 1 - pnorm((log(t) - K1*mu)/(sqrt(K1)*sd)) q4000.approx <- 1 - pnorm((log(t) - K2*mu)/(sqrt(K2)*sd)) plot(t, q1000, type = "l", lty = 2, ylab = "Pr(LR>t|H1)") lines(t, q4000, lty =3) lines(t , q1000.approx, lty = 1) lines(t, q4000.approx, lty = 1) ## End(Not run)