# Paternity LR of siblings
claim = nuclearPed(fa = "A", mo = "NN", children = "B")
unrel = list(singleton("A"), singleton("B"))
truth = nuclearPed(children = c("A", "B"))
# Simulation parameters
nsim = 10 # increase!
thresh = 1
ids = c("A", "B")
# 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{
# Founder inbreeding in true pedigree
founderInbreeding(truth, founders(truth)) = 0.5
truth
pow3 = LRpower(claim, unrel, truth, ids = ids, nsim = nsim,
threshold = thresh, markers = 1, seed = 123) # plot = TRUE
pow3
# }
Run the code above in your browser using DataLab