generate_tradeoff_plot.Rd
Generate trade-off plot
generate_tradeoff_plot(
data,
filter,
category,
benefit,
risk,
type_risk,
type_graph,
ci,
ci_method,
cl,
mab,
mar,
threshold,
ratio,
b1,
b2,
b3,
b4,
b5,
b6,
b7,
b8,
b9,
b10,
r1,
r2,
r3,
r4,
r5,
r6,
r7,
r8,
r9,
r10,
testdrug,
type_scale,
lower_x,
upper_x,
lower_y,
upper_y,
chartcolors
)
(data.frame
) input dataset
(character
) selected filter
(character
) selected category
(character
) selected benefit outcome
(character
) selected risk outcome
(character
) selected way to display risk outcomes
(crude proportions, Exposure-adjusted rates (per 100 PYs))
(character
) selected way to display binary outcomes
(Absolute risk, Relative risk, Odds ratio)
(character
) selected choice to display confidence intervals
or not (Yes, No)
(character
) selected method to display
confidence intervals (Supplied, Calculated)
(numeric
) confidence level
(numeric
) specified minimum acceptable benefit
(numeric
) specified maximum acceptable risk
(character
) selected way to set benefit-risk threshold
(None, Straight line, Segmented line, Smooth curve)
(numeric
) specified maximum acceptable ratio
between risk and benefit
(numeric
) specified benefit
(numeric
)
specified risk tolerance
(character
) selected choice to display test drug or not
(Yes, No)
(character
) selected scale display type (Fixed, Free)
(numeric
) specified axis limits
(vector
) a vector of colors, the same number of levels
as the number of treatments
a ggplot object
generate_tradeoff_plot(
data = effects_table, filter = "None", category = "All",
benefit = "Primary Efficacy", risk = "Reoccurring AE",
type_risk = "Crude proportions", type_graph = "Absolute risk",
ci = "Yes", ci_method = "Calculated", cl = 0.95,
mab = 0.05,
mar = 0.45,
threshold = "Segmented line",
ratio = 4,
b1 = 0.05,
b2 = 0.1,
b3 = 0.15,
b4 = 0.2,
b5 = 0.25,
b6 = 0.3,
b7 = 0.35,
b8 = 0.4,
b9 = 0.45,
b10 = 0.5,
r1 = 0.09,
r2 = 0.17,
r3 = 0.24,
r4 = 0.3,
r5 = 0.35,
r6 = 0.39,
r7 = 0.42,
r8 = 0.44,
r9 = 0.45,
r10 = 0.45,
testdrug = "Yes",
type_scale = "Free",
lower_x = 0,
upper_x = 0.5,
lower_y = 0,
upper_y = 0.5,
chartcolors = colfun()$fig7_colors
)
#> [2024-06-28 15:23:51] >
#> absolute risk CI for binary outcomes is calculated and saved
#> [2024-06-28 15:23:51] >
#> absolute risk CI for binary outcomes is calculated and saved
#> [2024-06-28 15:23:51] > prepare tradeoff data
#> [2024-06-28 15:23:51] > prepare trade-off plot
#> [2024-06-28 15:23:51] > update final trade-off plot