View source: R/lr_pigmentation.R
| lr_pigmentation | R Documentation |
Simulates likelihood ratio (LR) distributions for combined pigmentation
traits (hair, skin, and eye color) under both hypotheses. Uses pre-computed
LRs from lr_compute_pigmentation.
lr_pigmentation(df, seed = 1234, nsim = 500)
df |
A data.frame with columns |
seed |
Integer. Random seed for reproducibility. Default: 1234. |
nsim |
Integer. Number of LR values to simulate per hypothesis. Default: 500. |
The function samples LR values with probabilities proportional to:
H2 (Unrelated): Population frequencies (f_h_s_y)
H1 (Related): Conditioned probabilities (numerators)
This simulates the expected distribution of LRs when comparing the MP's traits against either random individuals (H2) or the true match (H1).
A data.frame with two columns:
Unrelated: LR values simulated under H2 (sampling proportional
to population frequencies)
Related: LR values simulated under H1 (sampling proportional
to conditioned probabilities)
Soft-deprecated in mispitools 2.0. Combined pigmentation is
generalised by nongenetic_feature (a categorical
feature over the joint pigmentation classes). 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_reference_pop for generating population data,
lr_compute_pigmentation for computing input LRs,
plot_lr_distribution for visualization.
# Full workflow for pigmentation LRs
pop_data <- sim_reference_pop(n = 500, seed = 123)
conditioned <- compute_conditioned_prop(pop_data, 1, 1, 1, 0.01, 0.01, 0.01)
unconditioned <- compute_reference_prop(pop_data)
lrs <- lr_compute_pigmentation(conditioned, unconditioned)
# Simulate LR distribution
lr_dist <- lr_pigmentation(lrs, nsim = 500, seed = 456)
head(lr_dist)
# Visualize
plot_lr_distribution(lr_dist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.