| es_report | R Documentation |
Generates a complete event study report in a single call: deep-clones the
task (non-mutation guarantee, REPORT-04), harvests diagnostics via
es_diagnostics(), and delegates rendering to
generate_report(). Returns the output file path(s) VISIBLY
so the path prints at the REPL without an explicit print().
es_report(
task,
output_file = "event_study_report.html",
format = "html",
sections = c("exec_summary", "data_methods", "results", "diagnostics", "robustness",
"references"),
provider = NULL,
title = "Event Study Report",
author = NULL,
confidence_level = 0.95,
interactive = TRUE,
verbose = getOption("eventstudy.verbose", TRUE),
...
)
task |
A fitted |
output_file |
Output file path (extension overridden per format).
Default |
format |
Character vector of output formats, any subset of
|
sections |
Character vector of sections to include. Default is all six
fixed sections:
|
provider |
Optional LLM provider forwarded to |
title |
Report title string. |
author |
Author name (optional, default |
confidence_level |
Confidence level for plots. Default 0.95. |
interactive |
Logical. Use interactive plotly plots in HTML output.
Default |
verbose |
Logical; if FALSE, suppress informational messages. Default
|
... |
Additional arguments forwarded to |
The narrative is assembled ONCE inside generate_report() (NARR-01):
es_report() does NOT call assemble_report_narrative() or
es_advise() directly. A provider argument is forwarded to
generate_report(), which assembles the narrative once before the
format loop. When provider = NULL (default), the report is fully
offline with no network or API key required.
A named character vector of output file path(s), one per rendered
format, returned visibly (the path prints at the REPL).
Keyed by format name, e.g.
c(html = "/tmp/report.html"). A single-format call returns a
length-1 named vector; result[["html"]] and result[[1L]]
both resolve.
generate_report, es_diagnostics,
run_event_study
Other eventstudy-export:
export_results(),
generate_report(),
tidy.EventStudyTask()
data(dieselgate)
task <- EventStudyTask$new(dieselgate$firm, dieselgate$index, dieselgate$request)
task <- run_event_study(task, ParameterSet$new())
# Offline single-format report written to a temporary directory
out <- file.path(tempdir(), "event_study_report.html")
path <- es_report(task, output_file = out, format = "html")
path[["html"]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.