View source: R/compute_conditioned_prop.R
| compute_conditioned_prop | R Documentation |
Calculates the conditioned proportions (numerator probabilities) for pigmentation trait combinations given the missing person's characteristics. These proportions represent P(observed traits | H1), accounting for observation errors.
compute_conditioned_prop(data, h, s, y, eh, es, ey)
data |
A data.frame with columns |
h |
Integer (1-5). Missing person's hair color category. |
s |
Integer (1-5). Missing person's skin color category. |
y |
Integer (1-5). Missing person's eye color category. |
eh |
Numeric (0-1). Error rate for observing hair color. |
es |
Numeric (0-1). Error rate for observing skin color. |
ey |
Numeric (0-1). Error rate for observing eye color. |
The function calculates the probability of observing each trait combination given the MP's true characteristics and the error rates. Higher probabilities are assigned to combinations matching the MP's traits, while combinations with mismatches have probabilities proportional to the error rates.
A data.frame with the original trait columns plus:
numerators: Conditioned probability for each combination,
normalized to sum to 1
Only unique combinations are returned.
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_reference_prop for reference proportions,
lr_compute_pigmentation for computing LRs.
# Generate reference population
pop_data <- sim_reference_pop(n = 500, seed = 123)
# Compute conditioned proportions for MP with traits (1,1,1)
cond_prop <- compute_conditioned_prop(
pop_data,
h = 1, s = 1, y = 1,
eh = 0.01, es = 0.01, ey = 0.01
)
head(cond_prop)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.