View source: R/compute_reference_prop.R
| compute_reference_prop | R Documentation |
Computes the frequency of each unique combination of hair color, skin color, and eye color in the reference population. These proportions serve as the denominator (H2 probabilities) in LR calculations for pigmentation traits.
compute_reference_prop(data)
data |
A data.frame with columns |
A data.frame with columns:
hair_colour: Hair color category
skin_colour: Skin color category
eye_colour: Eye color category
f_h_s_y: Population frequency of this combination
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")}
sim_reference_pop for generating the input data,
compute_conditioned_prop for conditioned proportions,
lr_compute_pigmentation for computing LRs.
# Generate reference population
pop_data <- sim_reference_pop(n = 500, seed = 123)
# Compute proportions
ref_prop <- compute_reference_prop(pop_data)
head(ref_prop)
# Most common combinations
ref_prop[order(-ref_prop$f_h_s_y), ][1:5, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.