Evaluates the KB decision table (category "robustness" rules) against
the diagnostic signals extracted from a fitted EventStudyTask or a
precomputed es_diagnostics object, and returns a severity-ranked
es_advice S3 object.
Usage
flag_robustness(x, provider = NULL, ...)
# Default S3 method
flag_robustness(x, provider = NULL, ...)
# S3 method for class 'EventStudyTask'
flag_robustness(x, provider = NULL, ...)
# S3 method for class 'es_diagnostics'
flag_robustness(x, provider = NULL, ...)Arguments
- x
A fitted
EventStudyTask(afterfit_model()) or a precomputedes_diagnosticsobject returned byes_diagnostics().- provider
Accepted but ignored in the offline path – present only so the Phase 7 call shape is forward-compatible. Default
NULL.- ...
Additional arguments (currently ignored).
Value
An S3 object of class "es_advice" – see recommend_stat
for field descriptions. Rules are filtered to category == "robustness".
Details
No LLM provider, network connection, or API key is required. The returned
es_advice object has the same shape as the Phase 7 Advice contract,
flagged is_deterministic = TRUE and source = "offline_kb".
See also
recommend_stat, es_diagnostics,
es_kb
Other eventstudy-advisor:
AnthropicProvider,
CustomProvider,
OpenAICompatProvider,
ProviderBase,
es_advise(),
es_diagnostics(),
es_kb(),
provider(),
recommend_stat()
Examples
# \donttest{
data(dieselgate)
task <- EventStudyTask$new(dieselgate$firm, dieselgate$index, dieselgate$request)
task <- run_event_study(task, ParameterSet$new())
advice <- flag_robustness(task)
print(advice)
#> Offline Event Study Advice
#> ==========================
#> Source: offline_kb
#> Deterministic: TRUE
#> Rules matched: 1
#>
#> [WARNING] KB-SMALL-N (citation: BrownWarner1985)
#> Recommendation: Very few valid events (n < 10). The cross-sectional t-test relies on a large-sample normal approximation that is unreliable with fewer than ~10 events. Non-parametric tests (Sign Test, Rank Test) are preferred in small samples, as documented by Brown & Warner (1985). Interpret parametric p-values cautiously. [Threshold: n < 10 — ASSUMED, adjustable]
#>
# }
