
Plot the operating characteristics of several designs
Source:R/plot.qdm_comparison.R
plot.qdm_comparison.RdFor one endpoint, draws one panel per decision with the probability of
that decision against the true treatment effect (or the parameter of the
treatment group without a concurrent control group, as in
plot.qdm_oc), with one curve per design. For two endpoints,
draws heat maps of the probabilities, with one row of panels per design
and one column per decision.
Usage
# S3 method for class 'qdm_comparison'
plot(
x,
decisions = NULL,
col_design = NULL,
col_go = "#658D1B",
col_nogo = "#D91E49",
col_gray = "#939597",
col_miss = "#E69F00",
linewidth = 1,
point_size = 1.5,
label_size = NULL,
base_size = 11,
legend_position = "bottom",
cell_values = TRUE,
...
)Arguments
- x
An object of class
"qdm_comparison".- decisions
The decisions to draw, some of
"Go","NoGo","Gray"and"Miss", orNULL(the default) for Go, NoGo and Gray, and Miss if it has positive probability in some scenario.- col_design
Colors of the curves of the designs (one endpoint), one per design, or
NULLfor the palette"Dark 3"ofgrDevices::hcl.colors().- col_go, col_nogo, col_gray, col_miss
Colors of the heat maps of the decisions (two endpoints).
- linewidth, point_size, label_size, base_size, legend_position
As in
plot.qdm_oc.- cell_values
Two endpoints only:
TRUE(the default) to write the probability in each cell of the heat maps.- ...
Not used; arguments given here are ignored with a warning.
Details
The horizontal axis must be the same for all designs: the scenarios are
the same, but a design without a concurrent control group has the
parameter of the treatment group on the axis, and the thresholds are
shifted by the location of the control group (see
plot.qdm_oc). The thresholds of the criteria are drawn when
they are the same for all designs.
Examples
des <- design_binary(
n_t = 12, n_c = 12,
prior_t = prior_beta(0.5, 0.5), prior_c = prior_beta(0.5, 0.5),
criterion = criterion_posterior(theta_tv = 0.2, theta_mav = 0.1,
gamma_go = 0.5, gamma_nogo = 0.8)
)
cmp <- qdm_compare(list(n12 = des, n24 = qdm_sample_size(des, 24, 24)),
data.frame(pi_t = seq(0.2, 0.8, by = 0.1), pi_c = 0.3))
plot(cmp)
plot(cmp, decisions = "Go")