undid_stage_two() now accepts categorical covariates.
Character and factor covariates are automatically converted into dummy
variables, omitting a reference category (the lowest level for factors,
otherwise the first category after sorting).factor argument to
undid_stage_two() for declaring covariates that should be
treated as categorical even when they are not character or factor
columns (e.g. numerically coded categories). Accepts a character vector
(factor = c("educ", "race")) or formula(s)
(factor = ~educ + race, factor = ~educ ~race,
or factor = c(~educ, ~race)).undid_stage_two() now drops rows with missing values in
the time, outcome, or covariate columns (with a warning reporting the
number of missing values per column) rather than stopping. Empty or
whitespace-only values in character columns are treated as missing.NA estimates.hc = 1).NA
for certain edge cases.lwd and legend parameters to the
S3 plot() method for UnDiDObj which controls
line width and legend locations, respectively. Removed the default
titles of plots.Added new aggregation methods for staggered adoption:
"sgt", "time", and "none".
"sgt" computes subaggregate ATTs for each
treatment-time and post-treatment period pair, further separated by
silo."time" computes subaggregate ATTs grouped by time since
treatment."none" skips subaggregate ATT computation and directly
computes the aggregate ATT from the underlying differences.undid_stage_three() now returns an object of class
UnDiDObj, providing a unified S3 interface.
print(), summary(),
coef(), and plot().Added support for event study plots via the plot()
method for UnDiDObj objects.
Added randomization inference p-values for subaggregate ATTs.
Fixed a miscalculation of jackknife standard errors and p-values.
Expanded weighting options for ATT computation:
"none", "diff", "att", and
"both".
"diff" applies weights when computing subaggregate
ATTs."att" applies weights when aggregating subaggregate
ATTs."both" applies weighting at both stages."none" disables weighting entirely.as.Date() calls in
undid_stage_two(), undid_stage_three(), and
plot_parllel_trends() to ensure compatability for R
versions 4.0.0 and onwards.