---
title: "Palatable Units: The Spiegelhalter Philosophy"
format:
  html:
    code-fold: true
    code-summary: "Show code"
vignette: >
  %\VignetteIndexEntry{Palatable Units: The Spiegelhalter Philosophy}
  %\VignetteEngine{quarto::html}
  %\VignetteEncoding{UTF-8}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = ""
)

if (requireNamespace("micromort", quietly = TRUE)) {
  library(micromort)
} else {
  pkgload::load_all(quiet = TRUE)
}

library(targets)
library(DT)

# Shared safe_tar_read with RDS fallback (see inst/vignette_utils.R)
source(file.path(tryCatch(rprojroot::find_root(rprojroot::is_r_package),
  error = function(e) "."), "inst", "vignette_utils.R"))
```

**"Statistics are not just numbers; they are the way we make sense of the world."** — Sir David Spiegelhalter

This vignette outlines the philosophy of **"Palatable Units"** championed by David Spiegelhalter (Winton Professor for the Public Understanding of Risk, Cambridge). His core argument is that abstract probabilities (e.g., "0.00004% hazard ratio") are meaningless to most people. To demystify risk, we must translate these into concrete, relatable units.

## 1. The Core Philosophy: Compare Apples to Oranges

The goal of palatable units is to create a common currency for risk. This allows us to strip away the emotional "dread factor" from scary-sounding events and compare them rationally against mundane activities.

### The Standard Units

*   **Micromort:** 1-in-a-million chance of **acute** death (sudden event).
*   **Microlife:** 30 minutes of life expectancy lost/gained **per day** (chronic **attrition**).

### What does 1-in-a-million feel like?

Abstract probabilities are hard to grasp. Spiegelhalter offers a concrete anchor (*The Norm Chronicles*, 2013; [plus.maths.org](https://plus.maths.org/content/os/issue55/features/risk/index/)):

> **Flip a fair coin 20 times. The probability of getting 20 heads in a row is 1 in 1,048,576 — approximately 1 micromort.**

This is a mathematical constant ($1/2^{20}$), not an estimate. It requires no denominator, no external source, and no geographic adjustment. If you can imagine the surprise of 20 consecutive heads, you can feel the scale of 1 micromort.

For context, Gigerenzer (*Calculated Risks*, 2002) recommends expressing all probabilities as **natural frequencies** — counts in a defined population rather than percentages. "1 death per 1,000,000 exposures" is clearer than "0.0001% mortality rate." This package follows that convention: every micromort value has a traceable numerator (deaths) and denominator (exposures).

## 2. Micromorts: Measuring "Stopping Living" (Hazard)

A micromort measures **acute hazard**: the immediate probability of an event causing death.

*   **Normalization:** Risk is normalized **per event** (or per unit distance), independent of the event's duration.
*   **Time Horizon:** The "time" is the discrete event itself.
    *   **Skydiving:** The risk is ~7 micromorts *per jump*. Whether the freefall lasts 30 seconds or 60 seconds is secondary to the event of jumping.
    *   **Scuba Diving:** The risk is ~5 micromorts *per dive*. A 30-minute dive and a 45-minute dive are treated as single "dive events" in broad statistics, though technically longer exposure increases risk.
    *   **Anesthesia:** ~10 micromorts *per operation*.

### Comparative Risk Table

The following table uses [`common_risks()`](../reference/common_risks.html), the package's curated dataset of 62 acute risks with full provenance tracking:

```{r palatable_units-chunk-1}
#| echo: false
safe_tar_read("vig_palatable_risks_filtered") |>
  DT::datatable(
    caption = "Acute risks from common_risks() dataset (click column headers to sort)",
    filter = "top",
    options = list(pageLength = 15, dom = "Bfrtip", scrollX = TRUE),
    rownames = FALSE
  )
```

> **Comparison:** Riding a motorcycle for just 60 miles carries the same acute death risk (~10 micromorts) as undergoing general anesthesia. Using a standardized dataset enables apples-to-apples comparisons across activities.

## 3. Microlives: Measuring "Speed of Aging" (Attrition)

While micromorts measure sudden death (Hazard), **Microlives** measure **chronic attrition**: the rate at which you are "using up" your life expectancy.

*   **Definition:** 1 Microlife = 30 minutes of life expectancy per day.
*   **Normalization:** Risk is normalized **per day** of maintaining a habit.
*   **Unit of Attrition:** The "unit" is the expected lifespan. -1 Microlife means your expected lifespan has shrunk by 30 minutes.
*   **Time Horizon:** Continuous. If you smoke 20 cigarettes a day, you are losing 10 microlives (5 hours) *every single day*.

### Daily Habits Table

Using [`chronic_risks()`](../reference/chronic_risks.html), the package's curated dataset of 22 chronic lifestyle factors:

```{r palatable_units-chunk-2}
#| echo: false
safe_tar_read("vig_palatable_chronic_risks") |>
  DT::datatable(
    caption = "Chronic lifestyle factors from chronic_risks() dataset (click to sort)",
    filter = "top",
    options = list(pageLength = 15, dom = "Bfrtip", scrollX = TRUE),
    rownames = FALSE
  )
```

> **Clarification:** A value of **-1 Microlife** is a **loss** (attrition). It effectively means you are aging 30 minutes faster than normal. The `annual_effect_days` column shows the cumulative impact over a year—a -1 daily deficit sums to ~7.5 days of lost life annually.

## 4. Visualization: The Risk Ladder

Spiegelhalter advocates for a **Logarithmic Risk Ladder**. This visualization helps placing rare risks (like asteroid impacts or terrorism) in context with daily risks.

*   **Why Log Scale?** Because risks span vast orders of magnitude (1 in 10 to 1 in 10 million).
*   **Interpretation:** A "100% increase" in a very rare risk (e.g., eating bacon increasing bowel cancer risk) might look huge in headlines but is often negligible on the ladder compared to the baseline risk of driving.

```{r palatable_units-chunk-3, fig.width=8, fig.height=14}
#| echo: false
#| fig-cap: "Spiegelhalter's logarithmic risk ladder placing activities from negligible (banana dose) to extreme (BASE jumping) on a unified scale."
#| fig-alt: "Horizontal bar chart on log scale showing ~40 activities ordered by micromorts. Activities span 5 orders of magnitude from 0.001 to 430 micromorts, coloured by category."
show_target("vig_palatable_risk_plot")
```

For interactive exploration, use `plot_risks_interactive()` which provides:

*   Hover details showing micromorts, microlives, and period
*   Click legend to show/hide categories
*   Dropdown filter for COVID-19 vs Other risks

```{r palatable_units-chunk-4}
#| echo: false
#| fig-cap: "Interactive risk ladder with hover details, category filtering, and zoom."
#| fig-alt: "Interactive plotly version of the risk ladder allowing users to hover for exact micromort values and filter categories via the legend."
safe_tar_read("vig_palatable_risk_plot_interactive")
```

## 5. Media Perception vs. Actual Risk

A key motivation for palatable units is correcting the **perception gap** between what we fear and what actually kills us.

### The Mismatch

According to [Our World in Data](https://ourworldindata.org/does-the-news-reflect-what-we-die-from), media coverage dramatically misrepresents actual causes of death:

| Cause of Death | Actual Deaths (%) | Media Coverage (%) | Ratio |
|----------------|-------------------|--------------------| ------|
| Heart disease | 29% | ~2% | 0.07x |
| Cancer | 27% | ~5% | 0.19x |
| Homicide | 0.9% | ~39% | 43x |
| Terrorism | <0.01% | ~18% | >1800x |

**Key insight:** Heart disease and cancer cause 56% of deaths but receive only 7% of media coverage. Meanwhile, terrorism (causing 16 deaths in 2023) received 18,000× more coverage than its proportional death rate.

### Why This Matters

Micromorts and microlives provide a standardized currency to cut through emotional reactions:

*   **Terrorism** (flying in 2001): ~0.01 micromorts per flight
*   **Daily baseline** (age 40): ~2 micromorts per day
*   **Driving 230 miles**: 1 micromort

The fear of flying after 9/11 led many Americans to drive instead, resulting in an estimated 1,600 additional road deaths—far exceeding the attack's direct toll.

### Applying Palatable Units

When news reports a "50% increase in cancer risk," use this framework:

1.  **Find the baseline**: What's the absolute risk? (e.g., 1 in 10,000)
2.  **Convert to micromorts**: 1 in 10,000 = 100 micromorts
3.  **Apply the increase**: 50% more = 150 micromorts
4.  **Compare to familiar risks**: 150 micromorts ≈ driving 150 × 230 = 34,500 miles

This contextualization reveals whether a "scary" headline represents a meaningful risk change.

## 6. Recommended Tools

While David Spiegelhalter focuses on concepts rather than specific software, the following R packages align with his mission of clear risk communication:

*   **`riskCommunicator`:** Designed for public health to provide interpretable effect measures (risk differences, number needed to treat) rather than abstract regression coefficients.
*   **`ggplot2`:** The standard for creating custom visuals like Risk Ladders and icon arrays.
*   **`micromort` (this package):** Specifically built to implement the palatable units framework.

## References

### Primary Sources

1.  Spiegelhalter, D., & Blastland, M. (2013). *The Norm Chronicles: Stories and numbers about danger*. Profile Books.
2.  Spiegelhalter, D. (2019). *The Art of Statistics: Learning from Data*. Pelican.

### Media Perception and Risk Communication

3.  [Does the news reflect what we die from?](https://ourworldindata.org/does-the-news-reflect-what-we-die-from) - Our World in Data analysis of media coverage vs actual causes of death.
4.  [Causes of Death](https://ourworldindata.org/causes-of-death) - Our World in Data global mortality statistics.
5.  [How the news changes the way we think and behave](https://www.bbc.com/future/article/20200512-how-the-news-changes-the-way-we-think-and-behave) - BBC Future on media influence.
6.  [Media Bias in Portrayals of Mortality Risks](https://www.researchgate.net/publication/386057693_Media_Bias_in_Portrayals_of_Mortality_Risks_Comparison_of_Newspaper_Coverage_to_Death_Rates) - Academic study comparing newspaper coverage to death rates.
7.  [Terrorism and You: The Real Odds](https://www.aei.org/articles/terrorism-and-you-the-real-odds/) - American Enterprise Institute analysis of terrorism risk perception.
8.  [Risk communication in the news](https://researchbriefings.files.parliament.uk/documents/POST-PN-0564/POST-PN-0564.pdf) - UK Parliamentary Office of Science and Technology briefing.
9.  [Media Coverage and Mortality Risk Assessment](https://pmc.ncbi.nlm.nih.gov/articles/PMC10102679/) - PMC research on media effects on risk perception.

## Reproducibility

```{r palatable_units-session-info, eval=TRUE}
sessionInfo()
```

```{r build-info}
#| echo: false
#| results: asis
cat(safe_tar_read("vig_build_info") %||% "")
```
