# NOT RUN {
#------------------------------------------------
# Example: Identification of a missing grandchild
#------------------------------------------------
set.seed(2509)
### Reference pedigree with missing grandchild (MP)
x = relabel(linearPed(2), old = 5, new = "MP")
# Simulate reference data for grandmother (5 STR markers)
x = setMarkers(x, locusAttributes = NorwegianFrequencies[1:5])
x = profileSim(x, N = 1, ids = 2)[[1]]
### Person of interest 1: Unrelated
poi1 = singleton("poi1")
# Transfer (empty) markers and simulate genotypes
poi1 = transferMarkers(from = x, to = poi1)
poi1 = profileSim(poi1, N = 1)[[1]]
# Compute LR
lr1 = missingPersonLR(x, missing = "MP", poi = poi1)
lr1
lr1$LRperMarker
### Person of interest 2: The true MP
# Simulate MP conditional on reference, and extract as singleton
poi2 = profileSim(x, N = 1, ids = "MP")[[1]]
# Extract MP as singleton
poi2 = subset(poi2, "MP")
# Compute LR
lr2 = missingPersonLR(x, missing = "MP", poi = poi2)
lr2
lr2$LRperMarker
# }
Run the code above in your browser using DataLab