
Building the Plot for nextBest-NextBestNCRMLoss Method.
Source: R/helpers_rules.R
h_next_best_ncrm_loss_plot.RdHelper function which creates the plot for nextBest-NextBestNCRMLoss()
method.
Usage
h_next_best_ncrm_loss_plot(
prob_mat,
posterior_loss,
max_overdose_prob,
dose_grid,
max_eligible_dose_level,
doselimit,
next_dose,
is_unacceptable_specified,
prob_plot_type = c("lollipop", "bar"),
dose_scale = c("linear", "log", "factor"),
axis_ticks = c("dosegrid", "regular"),
axis_text_angle = ifelse(match.arg(axis_ticks) == "dosegrid", 45, 0),
safe_dose_marker = c("line", "triangle")
)Arguments
- prob_mat
(
numeric)
matrix with probabilities of a grid doses to be in a given interval. Ifis_unacceptable_specifiedisTRUE, there must be 4 intervals (columns) inprob_mat:underdosing,target,excessive,unacceptable. Otherwise, there must be 3 intervals (columns):underdosing,target,overdose. Number of rows must be equal to number of doses in a grid.- posterior_loss
(
numeric)
posterior losses.- max_overdose_prob
(
number)
maximum overdose posterior probability that is allowed.- dose_grid
(
numeric)
dose grid.- max_eligible_dose_level
(
number)
maximum eligible dose level in thedose_grid.- doselimit
(
number)
the maximum allowed next dose.- next_dose
(
number)
next best dose.- is_unacceptable_specified
(
flag)
is unacceptable interval specified?- prob_plot_type
(
string)
probability geometry, either"lollipop"or"bar".- dose_scale
(
string)
dose-axis scale:"linear","log", or"factor"for equally spaced dose levels. The log scale requires all doses to be strictly positive.- axis_ticks
(
string)
x-axis tick positions, either at each dose-grid value ("dosegrid", the default) or at regular positions selected byggplot2("regular").- axis_text_angle
(
number)
rotation angle for x-axis tick labels. Defaults to 45 degrees foraxis_ticks = "dosegrid"and 0 degrees foraxis_ticks = "regular".- safe_dose_marker
(
string)
mark the maximum dose passing the overdose criterion with a red dashed"line"(default) or a red"triangle"above its probability geometry.