The goal of brcharts is to create benefit-risk charts in the publication: Colopy MW, Gakava L, Chen C. Planning Benefit-Risk Assessments Using Visualizations. Ther Innov Regul Sci. 2023 Nov;57(6):1123-1135. doi: 10.1007/s43441-023-00563-9. Epub 2023 Sep 8. PMID: 37682462.
You can install the development version of brcharts from GitHub with:
# install.packages("devtools")
devtools::install_github("BR-Visualization/brcharts")
Pyramid bar chart: how to read
Key Conclusions:
The left chart shows that type A has more females than males, while type B has more males than females.
The highest disease prevalence in type A is centered around ages 50-59 years, while centered around ages 70-74 years in type B.
The difference in distributions between disease types A and B can impact patient engagement, patient enrollment, and generalization of results.
Stratifying the randomization on disease type might be necessary if clinical evidence is needed for disease type B, particularly for younger age groups.
demography |>
dplyr::mutate(
Type = as.factor(paste0("Type ", Type)),
figprev = ifelse(
Gender == "Females", -1 * Prevalence / 100000, Prevalence / 100000
),
Sex = Gender
) |>
pyramid_chart(
levelvar = "Type", xvar = "figprev", yvar = "Age",
groupvar = "Sex", alpha_set = 0.7, chartcolors = colfun()$fig2_colors,
xlab = "Prevalence (x 100 000)"
)
Natural History plot: how to read
Key Conclusions:
The dark gray curve displays the downward trend in functional score or quality of life over time.
The graph show that the disease manifestations are sequential, hence do not necessarily occur at the same time. Patient follow-up will need to be several years to capture several of the functional domains.
History of disease progression also impacts patient engagement, since newly diagnosed patients might have no experience with more serious manifestations, such as mental function.
func <- function(x) 47.982 - 0.0305 * x - 0.57525 * x^2 + 0.0245 * x^3
line_chart(
func = func,
data_bands = data_bands,
data_lines = data_lines,
xmin = 0,
xmax = 14.2,
ymin = 0,
ymax = 50,
xbreaks = seq(0, 14, 2),
ybreaks = seq(0, 50, 5),
xlab = "Years Since Onset",
ylab = "Functional Score",
legend_title = "Severity: "
)
Grouped bar chart: how to read
Key Conclusions:
The graph displays the background rates of comorbidities, which is useful in designing patient preference studies. For example, patients might place high importance in a drug that reduces severe hypertension.
A display of background rates is also useful in determining whether a comorbidity is likely due to the drug or the disease.
grouped_barchart(
data = comorbidities, xvar = "Comorbidities",
yvar = "Prevalence", groupvar = "Severity",
chartcolors = colfun()$fig4_colors
)
Value Tree: how to read
Key Conclusions:
The size of this value tree was reduced by grouping frequently occurring adverse events into a single “recurring AE” outcome and grouping rare but serious adverse events into a single outcome.
While also a rare and serious, liver toxicity was colored gray because it only has a potential association with treatments.
Both primary and secondary efficacy clinical endpoints were included because they were not correlated. Quality of Life was included to capture what was important to the subjects.
value_tree(
diagram =
"graph LR;
A(<B>Benefit-Risk Balance</B>)-->B(<B>Benefits</B>)
B-->C(<B>Primary Efficacy</B>)
B-->D(<B>Secondary Efficacy</B>)
B-->E(<B>Quality of life</B>)
C-->F(<B>% Success</B>)
D-->G(<B>Mean change</B>)
E-->H(<B>Mean change</B>)
A-->I(<B>Risks</B>)
I-->J(<B>Recurring AE</B>)
I-->K(<B>Rare SAE</B>)
I-->L(<B>Liver Toxicity</B>)
J-->M(<B>Event rate</B>)
K-->N(<B>% Event</B>)
L-->O(<B>% Event</B>)
style A fill:#7ABD7E
style B fill:#7ABD7E
style I fill:#7ABD7E
style C fill:#FFE733
style D fill:#FFE733
style E fill:#FFE733
style J fill:#FFE733
style K fill:#FFE733
style L fill:#C6C6C6
style F fill: #FFAA1C
style G fill: #FFAA1C
style H fill: #FFAA1C
style M fill: #FFAA1C
style N fill: #FFAA1C
style O fill: #C6C6C6
"
)
Dot-Forest plot: how to read
Key Conclusions:
The forest plot gives a visual comparison of all key benefits and key risks simultaneously.
In this example, Drugs A and C have greater efficacy for the primary endpoint, but there are tradeoffs with quality of life and reoccurring AEs.
The hypothetical treatments do not differ on the outcome for the rare SAE, so that outcome might be dropped from the assessment.
The confidence intervals around the treatment differences display their uncertainty or statistical error, indicating possible necessity for a more specific SAE for the hypothetical investigational drug.
The forest plot can be repeated for different patient subgroups, to assess the robustness of the overall assessment.
It is important to not confuse the forest plot with the similar looking meta-analysis plot, which has multiple rows for different studies but for the same endpoint.
forest_dot_plot(effects_table,
filters = "None",
category = "All",
type_graph = "Absolute risk",
type_risk = "Crude proportions",
select_nnx = "Y",
x_scale_fixed_free = "Fixed",
ci_method = "Calculated",
exclude_outcome = "Liver"
)
Trade-Off plot: how to read
Key Conclusions:
For this hypothetical tradeoff plot, both the benefit and risk are the difference in proportions between four rival drug and the standard of care.
Since the four drugs were approved by regulators, the tradeoff curve was drawn such that drugs appear in the acceptance region.
The tradeoff curve shows that subjects are willing to accept a higher risk for a higher benefit.
The MAB and MAR could be obtained from the company strategy TPVP document.
Ideally, a drug closest to the lower right corner would be the most favorable option, and drug closest to the upper left corner would be least favorable.
Drug A is more favorable than drugs B and C. There is a tradeoff between Drugs A and D. Severe subjects may prefer Drug A for its higher benefit, and mild subjects may choose drug D for its lower risk.
The plot can display other combinations of one benefit and one risk, as well as for different patient subgroups, dose levels, and studies, in support of the generalizability of the investigational drug.
Ideally, the investigational drug will appear in an area of unmet need in the acceptance region.
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
)
Correlogram: how to read
Key Conclusions:
A positive correlation is expected between benefits and expected between risk. A negative correlation might appear between a benefit and risk. This would suggest that subject experiencing the benefit also experience the risk.
As expected, there is a high correlation between the primary and secondary efficacy outcomes. The team might decide to drop the secondary efficacy outcome if there is a concern with double counting.
There is also an explainable negative correlation between outcomes for quality-of-life and recurring AE. The medium positive correlation between recurring AE and primary efficacy is difficult to explain.
create_correlogram(corr)
Scatter plot of Continuous Outcomes: how to read
Key Conclusions:
The scatter plot of predictive incremental probabilities illustrates that 98.6% of subjects have benefit-risk predictive incremental probabilities that fall within the acceptance region, defined as the region below the diagonal threshold. Besides displaying subject variability, it indicates which subjects are most likely to benefit from the investigational drug.
scatter_plot(scatterplot, outcome = c("Benefit", "Risk"))
Stacked Bar chart of Ordinal Composite Outcomes: how to read
Key Conclusions:
In this hypothetical example, the placebo control group has more subjects with “No Benefit No AE.” The proportion of subjects with benefits is the highest in the high-dose group.
The most favorable outcome of “Benefit-No AE” is not only sustainable but the percentage of subjects is increasing.
It is expected that the percentage of subjects withdrawing increase over time, due to placebo subjects receiving no benefit and other subjects experiencing adverse events.
stacked_barchart(
data = comp_outcome,
chartcolors = colfun()$fig12_colors,
xlabel = "Study Week"
)
Cumulative excess plot: how to read
Key Conclusions:
The Cumulative Excess plot assessed whether the binary events for a benefit and risk occur concurrently and whether the profile is sustainable. The two positive trends indicate that both benefit and risk are higher for the active drug than placebo, but not at the same rate. This is an ideal scenario where the benefit increased with drug exposure while the risk plateaued.
gensurv_combined(
df_plot = cumexcess, subjects_pt = 500, visits_pt = 6,
df_table = cumexcess, fig_colors_pt = colfun()$fig13_colors,
rel_heights_table = c(1, 0.4),
legend_position_p = c(-0.2, 1.45),
titlename =
"Cumulative Excess # of Subjects w/ Events(per 100 Subjects)"
)