Skip to contents

Plot empirical coverage across simulation settings

Usage

plot_coverage(
  data,
  facet_formula,
  title = "Coverage",
  subtitle = "",
  linetype_var = NULL,
  use_aggregate = FALSE,
  x_breaks = NULL,
  point_size = 1.5,
  y_limits = NULL,
  alpha = 0.9
)

Arguments

data

A data frame containing summary statistics per configuration. Must include columns such as theta_true, coverage, and method.

facet_formula

A faceting formula (e.g. q0_lab ~ q1_lab) specifying how to arrange simulation panels.

title

Plot title.

subtitle

Plot subtitle.

linetype_var

Optional name of a column in data that controls line type. If NULL, all lines are solid.

use_aggregate

Logical; whether to use a larger theme suitable for aggregate plots with many legend entries.

x_breaks

Optional numeric vector of breaks for the x-axis (in theta_true space).

point_size

Point size for the scatter overlay.

y_limits

Optional y-axis limits (c(min, max)).

alpha

Nominal coverage level for the horizontal reference line. Defaults to 0.9.

Value

A ggplot object showing empirical coverage as a function of theta_true, with a horizontal reference line at alpha.