R/forest_dot_plot_utils.R
    prepare_absolute_risk_exp_adj.RdPrepare Forest plot data for exposure-adjusted rates
data frame for specified type of analysis
forest_plot_src <- subset(effects_table, !is.na(Rate_Type))
forest_plot_data <- prepare_absolute_risk_exp_adj(
  forest_plot_src,
  "Y",
  "Calculated"
)
#> [2025-02-12 02:27:18] >
#> CI for treatment difference in exposure-adjusted rates
#> is calculated and saved in a dataframe
#> [2025-02-12 02:27:18] > Prepare Forest plot data for exposure-adjusted rates
head(forest_plot_data)
#>   treatment   type factor                  outcome   diff          se
#> 1    Drug A Binary   Risk Reoccurring AE EventRate -0.720 0.027928480
#> 2    Drug A Binary   Risk         Rare SAE IncRate -0.299 0.017349352
#> 3    Drug A Binary   Risk            Liver IncRate -0.014 0.004000000
#> 4    Drug B Binary   Risk Reoccurring AE EventRate -0.320 0.019493589
#> 5    Drug B Binary   Risk         Rare SAE IncRate -0.299 0.017349352
#> 6    Drug B Binary   Risk            Liver IncRate -0.010 0.003162278
#>         lower        upper group
#> 1 -0.77473882 -0.665261185     1
#> 2 -0.33300410 -0.264995896     2
#> 3 -0.02183986 -0.006160144     3
#> 4 -0.35820673 -0.281793268     4
#> 5 -0.33300410 -0.264995896     5
#> 6 -0.01619795 -0.003802050     6