magnusdv / forrel

Forensic pedigree analysis and relatedness inference
GNU General Public License v2.0
11 stars 0 forks source link

kinshipLR #36

Closed thoree closed 4 years ago

thoree commented 4 years ago

Very nice new version of kinshipLR()! One thing: apparently hypotheses can be given identical names and also be replicated, should that be allowed?

library(forrel)
#> Loading required package: pedtools
ids = c("A", "B")
sibs = nuclearPed(children = ids)
sibs = simpleSim(sibs, N = 1, ids = ids, seed = 123, alleles = 1:2, verbose =F)
unrel = list(singleton("A"), singleton("B"))
kinshipLR(H = sibs,  H = unrel)
#> Total LR:
#>  H:H  H:H 
#> 1.25 1.00
kinshipLR(H = sibs,  H = unrel, H = sibs, source = "H")
#> Total LR:
#> H:H H:H H:H 
#> 1.0 0.8 1.0

Created on 2020-05-20 by the reprex package (v0.3.0)

magnusdv commented 4 years ago

I agree; fixed in 88953ba. Thanks!