Skip to contents

Black line: point estimates by age; grey ribbon: sampling interval; light ribbon: bias-aware (honest) interval. Optionally overlays age-group estimates as open circles with bars.

Usage

plot_profile(
  x,
  level = NULL,
  groups = NULL,
  scale = 1,
  honest = TRUE,
  ylab = "Effect",
  facet = NULL,
  col_band = "#00539B",
  col_line = col_band
)

Arguments

x

A cdd object or a data frame with age, ate, lower, higher, honest_lower, honest_higher, and optionally wave for faceting.

level

Outcome level to plot (default: first).

groups

Optional output of cdd_groups() for the same level.

scale

Multiply effects by this (100 for percentage points).

honest

Logical; draw the bias-aware ribbon.

ylab

Y-axis label.

facet

Optional column name to facet by (e.g. "wave").

col_band

Colour of the interval bands. The confidence interval is drawn at 22 percent opacity and the bias-aware interval at 10 percent.

col_line

Colour of the estimate line and of the group markers; the band colour by default.

Value

A ggplot object.