Draws the period-by-period treatment effect estimates and bootstrap
confidence intervals returned by sdid_event_study(), together with a
horizontal zero reference line and a vertical treatment-time reference line.
When the numeric time index has gaps (e.g. missing survey years such as
2011–2012 between 2010 and 2013), axis tick marks default to the observed
periods (x$times) so unobserved years are never labeled on the axis, and
vline_offset interpolates across the adjacent observed periods (-0.5
places the vertical line midway between the last pre-treatment period and
the first post-treatment period; the default -1 places it on the last
pre-treatment period).
Arguments
- x
An
sdid_event_studyobject fromsdid_event_study().- ci_type
Which confidence interval to draw:
"normal"or"percentile". Defaults tox$ci_type.- colors
Optional single color string for the point estimates and error bars (default
"#1a9641").- connect
Logical; connect adjacent period estimates with a line (default
FALSE, standard point-and-interval event-study style).- vline
Aesthetic overrides for the vertical treatment-time line, as a list passed to
ggplot2::geom_vline()(e.g.list(color = "red")), orNULL/FALSEto hide the line. May includexinterceptto pin an explicit axis position.- vline_offset
Where to draw the vertical treatment line, in periods relative to the first post-treatment period (default
-1, the last pre-treatment period;-0.5lands midway between the last pre-treatment and first post-treatment period, even when intermediate years are absent). Cannot be combined withvline = list(xintercept = ...).- hline
Aesthetic overrides for the horizontal zero line, as a list passed to
ggplot2::geom_hline(), orNULL/FALSEto hide the line.- ...
Ignored.
