HP = nuclearPed(noffs=1, sex=2) # Specifies individual 1 as the father of 3
HD= list(singleton(id=1,sex=1), singleton(id=3, sex=2)) # Specifies 1 and 3 as unrelated
p=c(0.2,0.3,0.5);L=length(p)
available = c(1, 3)
res=LRstat(HP, HD, available, alleles = 1:L, afreq=p)
E.LR.HP=res$main[1]
stopifnot(abs(E.LR.HP-(L+3)/4)<1e-06)
res$LRdist #Distribution of LR
Run the code above in your browser using DataLab