#Simple example, 2 markers, 3 genotypes. LR's and genotype probabilities precalculated
#The LR's for all possible genotypes for both markers. Each row corresponds to a marker
LR.table <- matrix(c(6,5,5,4,3,2),2,3)
#The population probabilities corresponding to the genotypes in LR.table
P.table <- rbind(c(0.2, 0.4, 0.4), c(0.1,0.6,0.3))
#LR observed for suspect
LR.suspect <- 20
pvalue <- pvalue.machine(LR.suspect, LR.table, P.table)
cat("p-value = ", pvalue, "\n")
Run the code above in your browser using DataLab