plot_hr: Plot mean posterior hazard ratio between treatment and...

View source: R/get_summary.R

plot_hrR Documentation

Plot mean posterior hazard ratio between treatment and control

Description

Plot mean posterior hazard ratio between treatment and control

Usage

plot_hr(dt, HR = 0.67, driftHR = 1, pred = "none")

Arguments

dt

a data.frame containing summary statistics for the posterior samples from each simulation generated with get_summary.

HR

pre-specified HR between treatment and control arm in the internal trial for which the mean posterior hazard ratio should be plotted. Must be within unique(dt$HR).

driftHR

pre-specified HR between external control arm and internal control arm for which the mean posterior hazard ratio should be plotted. Must be within unique(dt$driftHR).

pred

predictors to use when fitting exponential distribution in MCMC for which the mean posterior hazard ratio should be plotted. Must be within unique(dt$pred).

Value

a plot of class ggplot containing the mean posterior hazard ratio for each prior distribution.


psborrow documentation built on March 7, 2023, 8:32 p.m.