plot.pbayesdecisionprob2cont: Plot Method for pbayesdecisionprob2cont Objects

View source: R/plot.pbayesdecisionprob2cont.R

plot.pbayesdecisionprob2contR Documentation

Plot Method for pbayesdecisionprob2cont Objects

Description

Displays operating characteristics for two-continuous-endpoint results returned by pbayesdecisionprob2cont.

Usage

## S3 method for class 'pbayesdecisionprob2cont'
plot(
  x,
  which = "Go",
  title = NULL,
  xlab = NULL,
  ylab = NULL,
  col_go = "#658D1B",
  col_nogo = "#D91E49",
  col_gray = "#939597",
  base_size = 28,
  ...
)

Arguments

x

An object of class pbayesdecisionprob2cont.

which

A character string specifying which decision probability to plot. Must be one of "Go", "Gray", "NoGo", "all", or "overlay". Default is "Go".

title

A character string for the plot title. Defaults to NULL (no title displayed).

xlab

A character string or expression for the x-axis label. Defaults to NULL, which auto-generates a label based on design.

ylab

A character string or expression for the y-axis label. Defaults to NULL, which auto-generates a label based on design.

col_go

A character string specifying the high-end fill colour for the Go probability gradient. Default is "#658D1B".

col_nogo

A character string specifying the high-end fill colour for the NoGo probability gradient. Default is "#D91E49".

col_gray

A character string specifying the high-end fill colour for the Gray probability gradient. Default is "#939597".

base_size

A positive numeric scalar specifying the base font size (in points) passed to theme_bw(). Default is 28.

...

Further arguments passed to or from other methods (ignored).

Details

When the input scenarios form a regular grid over (mu_t1, mu_t2) (i.e., every combination of the unique values of mu_t1 and mu_t2 is present) and rho_t is constant, the function produces a filled tile plot: each panel (Go, Gray, NoGo) is coloured by its own probability on a continuous gradient (white to the panel colour), so intensity directly reflects the probability magnitude. Otherwise the function falls back to a scatter plot in which point colour encodes the decision probability on a continuous scale.

When which = "all", the three panels are arranged side-by-side using gridExtra::grid.arrange, so each panel retains its own independent colour scale. This requires the gridExtra package.

For design = 'controlled' or design = 'external', both axes are expressed as treatment-minus-control differences: \theta_1 = \mu_{t1} - \bar{\mu}_{c1} and \theta_2 = \mu_{t2} - \bar{\mu}_{c2}, where \bar{\mu}_{c1} and \bar{\mu}_{c2} are the means of the supplied mu_c1 and mu_c2 vectors. For design = 'uncontrolled', the axes represent \mu_{t1} and \mu_{t2} directly.

Vertical and horizontal reference lines are drawn at the decision thresholds:

  • When prob = 'posterior': vertical lines at \theta_{TV1} and \theta_{MAV1} (x-axis) and horizontal lines at \theta_{TV2} and \theta_{MAV2} (y-axis).

  • When prob = 'predictive': a single vertical line at \theta_{NULL1} and a single horizontal line at \theta_{NULL2}.

Value

Invisibly returns a ggplot object (single panel) or a gtable object (which = "all").


BayesianQDM documentation built on April 22, 2026, 1:09 a.m.