Base (abstract) class for return models used inside an
EventStudyTask. Each single event gets its own model instance, fitted on
that event's estimation-window data alone. Subclass this to plug a custom
return model into run_event_study() / fit_model().
A subclass must implement two methods:
fit(data_tbl)– fit the model ondata_tbl(a single event's rows, estimation and event window together) and populateprivate$.statisticsplus setprivate$.is_fitted.abnormal_returns(data_tbl)– returndata_tblwith anabnormal_returnscolumn added for the event window.
The statistics active binding exposes a named list consumed by the
test statistics layer. At minimum a subclass should populate:
sigma, degree_of_freedom, residuals,
forecast_error_corrected_sigma and
forecast_error_corrected_sigma_car. Since 2026-09-24, a model may
also set statistics$n_params (the number of parameters estimated
from the estimation window); PatellZTest reads this field for its
Q_i adjustment and falls back to 2 when a subclass does not report it.
Degenerate-input handling: subclasses that implement the shared contract
(see R/contract.R) read self$degenerate_mode,
self$event_id and self$firm_symbol, which are threaded onto
the cloned model instance by fit_model() before fit() is
called.
See also
Other eventstudy-models:
BHARModel,
Carhart4FactorModel,
ComparisonPeriodMeanAdjustedModel,
DCCGARCHModel,
FamaFrench3FactorModel,
FamaFrench5FactorModel,
GARCHModel,
LinearFactorModel,
LogReturn,
MarketAdjustedModel,
MarketModel,
ReturnCalculation,
RollingWindowModel,
SimpleReturn,
VolatilityModel,
VolumeModel
Public fields
model_nameName of the model.
degenerate_modeResolved degenerate-input mode injected by fit_model() before fit() is called. Subclasses that implement the degenerate-input contract (MarketModel and Phase-2 models) read this field inside fit() via .resolve_degenerate_mode(self$degenerate_mode).
event_idEvent identifier threaded from the outer data_tbl row. Used in degenerate-input error/warning messages.
firm_symbolFirm identifier threaded from the outer data_tbl row. Used in degenerate-input error/warning messages.
Active bindings
statisticsRead-only field to get statistics.
modelRead-only field to get the fitted model.
is_fittedRead-only field to check if the model is fitted. Statistics object contains different model specific KPIs that describes the fitted model.
