Shows the distribution of within-trial, within-arm endpoint correlations. The dashed line is the user-specified target correlation.

.plot_correlation(
  x,
  type = c("density", "histogram", "ecdf"),
  display = "all",
  endpoint = NULL,
  arm = NULL,
  show_reference = TRUE,
  max_points = 100000L,
  ...
)

Arguments

x

A result returned by sampleSize() or simPower() with keep_sim_data = TRUE.

type

Plot type: "density", "histogram", or "ecdf".

display

Comparator names to display, or "all".

endpoint

Optional endpoint names to display.

arm

Optional arm names to display.

show_reference

Logical; overlay the target correlation.

max_points

Maximum number of retained observations used.

...

Unused additional arguments.

Value

A ggplot object.