View source: R/es_diagnostics.R
| es_diagnostics | R Documentation |
Extracts already-computed statistical signals from a fitted
EventStudyTask into a flat, JSON-ready S3 list. This is the
always-available grounding foundation for the knowledge base and offline
advice layer – it recomputes nothing; all signals already exist in the
fitted task.
es_diagnostics(task, max_events = 20L)
task |
A fitted |
max_events |
Integer. Maximum number of events to include in the
per-event sections ( |
A named list of class "es_diagnostics" with six sections:
metaList: n_events_total (integer), n_events_shown
(integer), n_events_summarized (integer), event_ids_shown
(integer vector).
estimation_windowList of plain numeric vectors (length
n_events_shown): r2, sigma, degree_of_freedom,
shapiro_p, dw_stat, ljung_box_p, acf1.
Each entry is NA_real_ when the model was not fitted or residuals
are insufficient for the test.
event_windowList of plain numeric vectors (length
n_events_shown): ar_t (last event-window day AR t-stat),
ar_p (two-sided p-value), car_t (full-window CAR t-stat),
car_p (two-sided p-value), final_car. All NA_real_
when the ART/CART columns are absent.
cross_sectionalList of scalars aggregated across ALL events:
n_events (total), n_valid_events (fitted count),
car_iqr, car_sd, n_overlap_pairs, any_overlap.
Multi-event fields degrade to NA when task$aar_caar_tbl
is NULL.
contract_stateList of logical/numeric vectors (length
n_events_shown): is_fitted, na_ar_count,
na_est_count, insufficient_obs, zero_var_index.
aggregate_summaryNamed list summarising remainder events
(those beyond max_events): n_summarized,
mean_r2, median_r2, mean_final_car,
n_fitted, n_degenerate. NULL when no events
are summarised (all shown).
model_diagnostics, recommend_stat,
flag_robustness, run_event_study
Other eventstudy-advisor:
AnthropicProvider,
CustomProvider,
OpenAICompatProvider,
ProviderBase,
es_advise(),
es_kb(),
flag_robustness(),
provider(),
recommend_stat()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.