# Paternity LR of siblings
ids = c("A", "B")
truth = nuclearPed(children = ids)
claim = nuclearPed(fa = "A", mo = "NN", children = "B")
unrel = singletons(ids)
# Simulation parameters
nsim = 10 # increase!
thresh = 1
# Simulation 1:
als = 1:5
afr = runif(5)
afr = afr/sum(afr)
pow1 = LRpower(claim, unrel, truth, ids = ids, nsim = nsim,
threshold = thresh, alleles = als, afreq = afr,
seed = 123)
pow1
# Simulation 2: Same, but using an attached marker
truth = addMarker(truth, alleles = als, afreq = afr)
pow2 = LRpower(claim, unrel, truth, ids = ids, nsim = nsim,
threshold = thresh, markers = 1, seed = 123)
stopifnot(identical(pow1$LRperSim, pow2$LRperSim))
# \donttest{
# True pedigree has inbred founders
truth2 = setFounderInbreeding(truth, value = 0.5)
pow3 = LRpower(claim, unrel, truth2, ids = ids, nsim = nsim,
threshold = thresh, markers = 1, seed = 123) # plot = TRUE
pow3
# }
Run the code above in your browser using DataLab