Description Usage Arguments Value Author(s)
View source: R/rolling_event_study.R
Rolling Event Study
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
formula |
A formula object describing the regression to be run. If dummy dates are specified in 'id_dates', they will be added to this formula. |
data |
A data.frame object containing the data for the regression and a 'date' variable. |
pred_date_range |
A vector of the min and max date for the prediction range. |
exclude_dates |
A vector of dates which should be excluded from the fitted regression models. |
id_dates |
A vector of dates which should be 'dummied out' via indicator variables. |
misrep_dates |
A vector of dates which should be flagged as misrepresentation dates in the output. Does not affect the regression model. |
disc_dates |
A vector of dates which should be flagged as disclosure dates in the output. Does not affect the regression models. |
rolling_window |
A number specifying the width of the rolling window. E.g., a window of 50 means that the regression used to predict returns on day i will be fitted on data spanning from day i-50 to day i-1. |
roll_fixed |
Either 'observations' or 'window'. Where excluded dates fall within the rolling window for a given date, this specifies whether the number of observations should remain fixed–meaning the window must be extended–or whether the window should remain fixed–meaning the number of observations will be lower. |
orth |
A formula object describing the orthogonalziation which should be applied (e.g., for y ~ x1 + x2, y in the final regression would be replaced by the residual from this regression.) |
p.val_thresh |
Threshold for flagging residuals as significant. 5% by default. |
simple |
TRUE/FALSE indicating whether full output or just 'table' should be returned. FALSE by default. |
If simple is FALSE, an list containing a table of event study results, which the regressions themselves as a column, and many other variables of interest relating to the event study.
Levi Moneyhun
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.