| plot_cpt | R Documentation |
Creates a three-panel visualization comparing conditional probability tables (CPTs) and their resulting likelihood ratios:
Panel A: P(D|H2) - Population-based probabilities
Panel B: P(D|H1) - Missing person-based probabilities
Panel C: log10(LR) - Likelihood ratios for each combination
This visualization helps understand how different combinations of sex, age group, and hair color contribute to the likelihood ratio.
plot_cpt(CPT_POP, CPT_MP)
CPT_POP |
Matrix. Population-based conditional probability table,
typically output from |
CPT_MP |
Matrix. Missing person-based conditional probability table,
typically output from |
The heatmaps use a blue gradient where darker colors indicate higher values (higher probabilities or higher LRs).
Each cell is labeled with its value rounded to 2 decimal places.
The LR panel (C) shows log10(LR), where:
Positive values (blue) favor H1 (related)
Negative values favor H2 (unrelated)
Zero indicates neutral evidence
Row labels indicate sex and age group combinations:
F-T1: Female, age within MP range
F-T0: Female, age outside MP range
M-T1: Male, age within MP range
M-T0: Male, age outside MP range
Column labels indicate hair color categories (1-5).
A ggplot2 object with three panels arranged horizontally,
showing heatmaps with cell values annotated.
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")}
cpt_population for creating the H2 table,
cpt_missing_person for creating the H1 table.
# Create both CPTs
cpt_h2 <- cpt_population()
cpt_h1 <- cpt_missing_person(MPs = "F", MPc = 1)
# Visualize comparison
plot_cpt(cpt_h2, cpt_h1)
# Different MP characteristics
cpt_h1_male <- cpt_missing_person(MPs = "M", MPc = 3)
plot_cpt(cpt_h2, cpt_h1_male)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.