Skip to contents

Base plot() method for att_result objects returned by att() (or the deprecated calc_att()). Draws point estimates with confidence-interval bars: a single point for aggregation = "simple", one point per cohort for "by_cohort", and one per calendar period for "by_time".

Usage

# S3 method for class 'att_result'
plot(
  x,
  ci_level = 0.95,
  color = "#B25D91FF",
  zero_line = TRUE,
  theme_style = c("bw", "minimal", "classic"),
  ...
)

# S3 method for class 'att_result'
autoplot(object, ...)

Arguments

x

An att_result object.

ci_level

Confidence level to display (default 0.95; must be one of the levels requested in the originating call).

color

Point and interval colour (default "#B25D91FF").

zero_line

Logical; draw a dashed reference line at zero (default TRUE).

theme_style

One of "bw" (default), "minimal", or "classic".

...

Unused.

object

An att_result object.

Value

A ggplot object.

See also

Examples

if (FALSE) { # \dontrun{
res <- att(df, outcome = y, time = year, timing = g, unit = id,
           aggregation = "by_cohort")
plot(res)
} # }