Generates a PDF containing one or more plots of average attributable fractions over time. If by_region is TRUE, the function creates separate plots for each region. All plots are saved to a single PDF file named "aggregated_AF_by_region.pdf" in the specified output_dir.
plot_aggregated_AF(data, by_region = FALSE, output_dir = ".")No return value. A PDF file is created.
A data frame containing annual attributable fraction estimates. Must include columns: year, average_attributable_fraction, lower_ci_attributable_fraction, upper_ci_attributable_fraction. If by_region is TRUE, must also include region.
Logical. If TRUE, plots are generated per region using region. Defaults to FALSE.
Character. Directory path where the PDF file will be saved. Must exist. Defaults to ".".