Computes how activity micromort rankings shift when the base estimate is
varied by ±pct%. Useful for communicating uncertainty around point
estimates derived from sparse epidemiological data.
Arguments
- activity
Character scalar — activity name matching a row in
common_risks(). PassNULL(default) to return sensitivity for all activities.- pct
Numeric scalar — percentage variation applied symmetrically around the base estimate. Default
20(i.e., ±20%). Must be in (0, 100).
Value
A tibble with columns:
- activity
Activity name
- micromorts_base
Base micromort estimate from
common_risks()- micromorts_low
Low estimate:
base * (1 - pct/100)- micromorts_high
High estimate:
base * (1 + pct/100)- rank_base
Rank of the activity at the base estimate (1 = highest risk)
- rank_change
Absolute rank positions shifted between low and high estimates
Details
Activities are sourced from common_risks(). The rank_change column
reports the absolute number of ranking positions an activity moves between
its low and high estimate when all activities are re-ranked.
Examples
# Sensitivity for a single activity
risk_sensitivity("Skydiving (US)")
#> # A tibble: 1 × 6
#> activity micromorts_base micromorts_low micromorts_high rank_base rank_change
#> <chr> <dbl> <dbl> <dbl> <int> <int>
#> 1 Skydivin… 8 6.4 9.6 32 0
# Sensitivity for all activities at ±10%
risk_sensitivity(pct = 10)
#> # A tibble: 107 × 6
#> activity micromorts_base micromorts_low micromorts_high rank_base rank_change
#> <chr> <dbl> <dbl> <dbl> <int> <int>
#> 1 Mt. Eve… 37932 34139. 41725. 1 0
#> 2 Himalay… 12000 10800 13200 2 0
#> 3 COVID-1… 10000 9000 11000 3 0
#> 4 Spanish… 3000 2700 3300 4 0
#> 5 Matterh… 2840 2556 3124 5 0
#> 6 Living … 500 450 550 6 0
#> 7 Living … 463 417. 509. 7 0
#> 8 Base ju… 430 387 473 8 0
#> 9 First d… 430 387 473 8 0
#> 10 COVID-1… 234 211. 257. 10 0
#> # ℹ 97 more rows
# Activities with the largest rank uncertainty
risk_sensitivity() |> dplyr::arrange(dplyr::desc(rank_change))
#> # A tibble: 107 × 6
#> activity micromorts_base micromorts_low micromorts_high rank_base rank_change
#> <chr> <dbl> <dbl> <dbl> <int> <int>
#> 1 Mt. Eve… 37932 30346. 45518. 1 0
#> 2 Himalay… 12000 9600 14400 2 0
#> 3 COVID-1… 10000 8000 12000 3 0
#> 4 Spanish… 3000 2400 3600 4 0
#> 5 Matterh… 2840 2272 3408 5 0
#> 6 Living … 500 400 600 6 0
#> 7 Living … 463 370. 556. 7 0
#> 8 Base ju… 430 344 516 8 0
#> 9 First d… 430 344 516 8 0
#> 10 COVID-1… 234 187. 281. 10 0
#> # ℹ 97 more rows
