powered by
plot_es() produces standard event study plots, showing estimated effects and confidence intervals across event time. Supports both ribbon and errorbar styles, multiple confidence levels, and several ggplot2 themes.
plot_es()
plot_es( data, ci_level = 0.95, type = "ribbon", vline_val = 0, vline_color = "#000", hline_val = 0, hline_color = "#000", linewidth = 1, pointsize = 2, alpha = 0.2, barwidth = 0.2, color = "#B25D91FF", fill = "#B25D91FF", theme_style = "bw" )
A ggplot2 object.
Data frame returned by run_es().
run_es()
Confidence level for intervals (numeric, e.g. 0.95). Must match columns like 'conf_low_95'.
Confidence interval style: "ribbon" (default) or "errorbar".
"ribbon"
"errorbar"
X value for vertical reference line (default: 0).
Color for vertical line.
Y value for horizontal reference line (default: 0).
Color for horizontal line.
Width of estimate line or error bars.
Point size for estimates.
Transparency for ribbon (default: 0.2).
Width of error bars (if type = "errorbar").
Color for lines and points.
Fill color for ribbon.
ggplot2 theme: "bw" (default), "minimal", or "classic".
"bw"
"minimal"
"classic"
Yosuke Abe
Visualizes event study estimates and confidence intervals produced by run_es().
run_es
if (FALSE) { result <- run_es(...) plot_es(result, ci_level = 0.95, type = "ribbon") }
Run the code above in your browser using DataLab