plot_es {fixes} | R Documentation |
Plot Event Study Results
Description
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.
Usage
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"
)
Arguments
data |
Data frame returned by |
ci_level |
Confidence level for intervals (numeric, e.g. 0.95). Must match columns like 'conf_low_95'. |
type |
Confidence interval style: |
vline_val |
X value for vertical reference line (default: 0). |
vline_color |
Color for vertical line. |
hline_val |
Y value for horizontal reference line (default: 0). |
hline_color |
Color for horizontal line. |
linewidth |
Width of estimate line or error bars. |
pointsize |
Point size for estimates. |
alpha |
Transparency for ribbon (default: 0.2). |
barwidth |
Width of error bars (if type = "errorbar"). |
color |
Color for lines and points. |
fill |
Fill color for ribbon. |
theme_style |
ggplot2 theme: |
Details
Visualizes event study estimates and confidence intervals produced by run_es()
.
Value
A ggplot2 object.
Author(s)
Yosuke Abe
See Also
Examples
## Not run:
result <- run_es(...)
plot_es(result, ci_level = 0.95, type = "ribbon")
## End(Not run)