Skip to contents

Plot calibration bias for \(\hat q_0\) and \(\hat q_1\)

Usage

plot_q_bias(
  data,
  facet_formula,
  title = "Calibration Estimate Bias",
  subtitle = "",
  linetype_var = NULL,
  use_aggregate = FALSE,
  x_breaks = NULL,
  point_size = 1.5
)

Arguments

data

A data frame containing calibration summary statistics, typically with columns theta_true, bias, metric (e.g. "q0" or "q1"), and any faceting variables.

facet_formula

A faceting formula (e.g. q0_lab ~ q1_lab or q_val_lab ~ label_ratio_lab) specifying how panels are arranged.

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.

Value

A ggplot object showing calibration bias for \(\hat q_0\) and \(\hat q_1\).