Nothing
run_es() and plot_es() now support returning and visualizing multiple confidence levels (e.g., 90%, 95%, 99%) in a single analysis.plot_es() adds ci_level selection, more theme options (theme_style), and improved ribbon/error bar display.NA in timing):timing are now retained as never-treated controls (staggered only).weights input:~ popwt), bare names (popwt), or character strings ("popwt").cluster input handling:unit is supplied without time_transform = TRUE.staggered = TRUE option allows timing to vary by unit (e.g., treatment year column).Units with NA in timing are safely retained as untreated.
Added support for observation weights:
Use the weights argument (e.g., ~ popwt) to run weighted regressions.
Automatic lead/lag range detection:
lead_range or lag_range is NULL, the function computes the maximum feasible range from the data.unit is specified without time_transform = TRUE.plot_es():ggplot2::scale_x_continuous() with integer breaks spaced by 1, aligned to the relative_time range.Date:time_transform = TRUE to automatically convert the time variable into a unit-level sequential index (1, 2, 3, ...) for event study estimation.unit argument to specify the panel unit identifier required when time_transform = TRUE.Date class in the time variable and converts it automatically to numeric if time_transform = FALSE.unit is missing or time is of unsupported type.@examples in the function documentation to include Date-based examples.time_transform usage.README.md to describe irregular time handling and demonstrate new use cases.time_transform, unit handling, and Date conversion edge cases.lead1, lag0) already exist in the dataset to prevent accidental overwriting.lead_range, lag_range, and interval) has fewer than 10 rows, helping users identify overly narrow estimation windows.treatment variable: it is now coerced to logical using as.logical() to support both binary numeric (0/1) and logical (TRUE/FALSE) formats.fe argument (e.g., ~ id + year) were combined using model_formula | fe_text, which caused evaluation errors during tests.as.formula() to ensure compatibility with fixest::feols().run_es():~ x1 + x2).fe and cluster arguments must now be specified using a one-sided formula (e.g., ~ id + year).cluster is still accepted.fe_var argument now supports additive notation (firm_id + year) instead of character vectors.plot_es() efficiency and documentation.fe notation.This version introduced several enhancements and refinements to improve usability and maintainability.
outcome_var, treated_var, and time_var are now processed using rlang::ensym() for better robustness.fe_var and cluster_var handling improved for more reliable column referencing.plot_es() function:relative_time, estimate, etc.) are present.baseline handling could lead to incorrect sorting of lead/lag terms.This is the first release of the fixes package, providing tools for estimating and visualizing event study models with fixed effects.
run_es(): A function to estimate event study models using fixest::feols(), generating lead and lag variables automatically.fe_var as character vector).cluster_var.interval argument.plot_es(): A function to visualize event study results with ggplot2.type = "ribbon", default).type = "errorbar").fixest::feols().interval argument).c("firm_id", "year"))."state_id").fe_var.Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.