write_csv(five_year_table, "Table_A2_discount_5year.csv")
# ══ FIGURE: Discount factors ══════════════════════════════════════════════════
plot_df <- discount_df %>%
pivot_longer(
cols = c(factor_OMB, factor_pluralistic),
names_to = "approach",
values_to = "factor"
) %>%
mutate(
approach = recode(approach,
factor_OMB = "Declining rate",
factor_pluralistic = "Pluralistic rate"),
year = t + 2020
)
# Reference values at year 50 (2070)
yr50 <- discount_df %>% filter(t == 50)
ggplot(plot_df, aes(x = year,
y = factor,
colour = approach,
linetype = approach)) +
geom_line(linewidth = 1.0) +
# OMB rate step markers
geom_vline(xintercept = c(2080, 2095),
linetype = "dashed",
colour = "#185FA5",
linewidth = 0.3,
alpha = 0.5) +
annotate("text", x = 2081, y = 0.97,
label = "Declining Rate \u2192 1.9%",
hjust = 0, size = 3, colour = "#185FA5", alpha = 0.8) +
annotate("text", x = 2096, y = 0.90,
label = "Declining Rate \u2192 1.8%",
hjust = 0, size = 3, colour = "#185FA5", alpha = 0.8) +
# Year 2070 annotations
annotate("text", x = 2071,
y = yr50$factor_pluralistic + 0.025,
label = paste0(round(yr50$factor_pluralistic * 100), "% retained"),
hjust = 0, size = 3, colour = "#D85A30") +
annotate("text", x = 2071,
y = yr50$factor_OMB +0.005,
label = paste0(round(yr50$factor_OMB * 100), "% retained"),
hjust = 0, size = 3, colour = "#185FA5") +
annotate("text", x = 2070, y = 1.01,
label = "2070", hjust = 0.5,
size = 2.8, colour = "grey55") +
scale_colour_manual(values = c(
"Declining rate" = "#185FA5",
"Pluralistic rate" = "#D85A30"
)) +
scale_linetype_manual(values = c(
"Declining rate" = "solid",
"Pluralistic rate" = "solid"
)) +
scale_y_continuous(
labels = scales::label_percent(accuracy = 1),
limits = c(0, 1),
breaks = seq(0, 1, 0.1)
) +
scale_x_continuous(breaks = seq(2020, 2120, 10)) +
labs(
x = "Year",
y = "Proportion of value retained",
colour = NULL,
linetype = NULL,
) +
theme_minimal(base_size = 18, base_family = "Times New Roman") +
theme(
legend.position = "bottom",
legend.title.position = "top",
legend.key.width = unit(1.5, "cm"),
legend.title = element_text(family = "Times New Roman", hjust = 0.5),
legend.text = element_text(family = "Times New Roman"),
panel.grid.minor = element_blank(),
panel.grid.major.x = element_blank(),
axis.text.x = element_text(angle = 45, hjust = 1),
plot.caption = element_text(size = 10, colour = "grey50",
lineheight = 1.3,
family = "Times New Roman")
) +
guides(colour = guide_legend(nrow = 1),
linetype = guide_legend(nrow = 1))