Interactive event-study plot with hover details
Source:R/plot_es_interactive.R
plot_es_interactive.RdCreates an interactive plotly visualization of event study results with hover-over displays showing coefficients, confidence intervals, and other details.
Usage
plot_es_interactive(
data,
ci_level = 0.95,
vline_val = 0,
hline_val = 0,
vline_color = "#000",
hline_color = "#000",
color = "#B25D91FF",
fill = "#B25D91FF",
alpha = 0.2,
linewidth = 2,
markersize = 8,
show_ribbon = TRUE,
show_simultaneous = FALSE,
height = NULL,
width = NULL
)Arguments
- data
An object of class
es_resultreturned byrun_es().- ci_level
Confidence level to display (e.g., 0.95). Default is 0.95.
- vline_val
Numeric location for vertical reference line (default 0).
- hline_val
Numeric location for horizontal reference line (default 0).
- vline_color
Color for vertical reference line (default "#000").
- hline_color
Color for horizontal reference line (default "#000").
- color
Point and line color (default "#B25D91FF").
- fill
Ribbon/band fill color (default "#B25D91FF").
- alpha
Ribbon transparency (default 0.2).
- linewidth
Line width (default 2).
- markersize
Marker size (default 8).
- show_ribbon
Logical; if TRUE, shows confidence interval as a ribbon band (default TRUE).
- show_simultaneous
Logical; if
TRUE, overlays a second (lighter) ribbon for the simultaneous bootstrap CI and extends the hover tooltip with simultaneous CI bounds. Requiresbootstrap = TRUEin the originatingrun_es()call. DefaultFALSE.- height
Plot height in pixels (default NULL for auto).
- width
Plot width in pixels (default NULL for auto).