| lr_age | R Documentation |
Simulates age observations and optionally computes likelihood ratios (LRs) under either H1 (unidentified person is the missing person) or H2 (unidentified person is not the missing person).
Ages are categorized into two groups based on whether they fall within the missing person's estimated age range:
T1: Age within range (MPa - MPr) to (MPa + MPr)
T0: Age outside range
lr_age(
MPa = 40,
MPr = 6,
UHRr = 1,
gam = 0.07,
numsims = 1000,
epa = 0.05,
erRa = epa,
H = 1,
modelA = c("uniform", "custom")[1],
LR = FALSE,
seed = 1234,
nsims = NULL
)
MPa |
Numeric. Missing person's estimated age in years. Default: 40. |
MPr |
Numeric. Age range tolerance (plus/minus years). The matching interval is (MPa - MPr) to (MPa + MPr). Default: 6. |
UHRr |
Numeric. Additional uncertainty range for the unidentified person's age estimation. Default: 1. |
gam |
Numeric. Gamma parameter for age uncertainty scaling. The uncertainty interval is age +/- (gam * age + UHRr). Default: 0.07. |
numsims |
Integer. Number of simulations to perform. Default: 1000. |
epa |
Numeric (0-1). Error rate for age categorization. Default: 0.05. |
erRa |
Numeric (0-1). Error rate in the reference/database.
Defaults to |
H |
Integer (1 or 2). Hypothesis to simulate under:
Default: 1. |
modelA |
Character. Reference age distribution model:
|
LR |
Logical. If TRUE, compute and return LR values. Default: FALSE. |
seed |
Integer. Random seed for reproducibility. Default: 1234. |
nsims |
Deprecated. Use |
Under H1 (Related): Age is sampled to fall within the MP's range with probability (1 - erRa), outside with probability erRa.
Under H2 (Unrelated): Age is sampled uniformly from 1-80, then categorized.
LR Calculation (uniform model):
LR(T1) = (1 - epa) / P(T1), where P(T1) = 2*MPr/80
LR(T0) = epa / P(T0), where P(T0) = 1 - P(T1)
A data.frame with columns:
group: Age group classification ("T1" or "T0")
age: Simulated age value
UHRmin: Lower bound of uncertainty interval
UHRmax: Upper bound of uncertainty interval
LRa: Likelihood ratio (only if LR = TRUE)
Soft-deprecated in mispitools 2.0. This feature is generalised by
nongenetic_feature (a continuous feature); collapsing
the population grid to two cells (within tolerance vs outside)
reproduces the T1 / T0 LR exactly. The legacy function still works
for the 2.0 release-candidate cycle and will be removed afterwards.
Marsico FL, et al. (2023). "Likelihood ratios for non-genetic evidence in missing person cases." Forensic Science International: Genetics, 66, 102891. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.fsigen.2023.102891")}
nongenetic_feature for the unified replacement,
sim_lr_prelim for unified preliminary LR simulations,
lr_sex, lr_hair_color for other variables.
# Simulate under H1 (related)
sim_h1 <- lr_age(MPa = 40, MPr = 6, H = 1, numsims = 100)
table(sim_h1$group)
# Simulate under H2 with LR values
sim_h2 <- lr_age(MPa = 40, MPr = 6, H = 2, numsims = 100, LR = TRUE)
head(sim_h2)
# Narrower age range (more discriminating)
sim_narrow <- lr_age(MPa = 35, MPr = 3, numsims = 500, LR = TRUE)
summary(sim_narrow$LRa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.