Skip to content

Commit

Permalink
Merge branch 'did' of https://github.com/s3alfisc/pyfixest into did
Browse files Browse the repository at this point in the history
  • Loading branch information
s3alfisc committed Nov 4, 2023
2 parents eb81717 + d320c7f commit 87e5907
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pyfixest/experimental/did.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@




def event_study(data, yname, idname, tname, gname, xfml = None, estimator = "twfe", att = True, cluster = "idname"):

"""
Expand Down Expand Up @@ -337,6 +338,7 @@ def _did2s_estimate(data: pd.DataFrame, yname : str, _first_stage: str, _second_
# estimate first stage
fit1 = feols(fml = _first_stage_full, data = _not_yet_treated_data, vcov = "iid") # iid as it might be faster than CRV


# obtain estimated fixed effects
fit1.fixef()

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ At the moment, `PyFixest` supports
- Several Robust and Cluster Robust Variance-Covariance Types
- Wild Cluster Bootstrap Inference (via [wildboottest](https://github.com/s3alfisc/wildboottest))
- Support for estimators of the "new" Difference-in-Difference literature is work in progress. `PyFixest` currently provides an
experimentla implementation of Gardner's Did2s estimtator (via the `pyfixest.experimental.did` module, only ATT estimation).
experimental implementation of Gardner's Did2s estimtator (via the `pyfixest.experimental.did` module, only ATT estimation).

## Installation

Expand Down
2 changes: 1 addition & 1 deletion tests/test_did.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def test_event_study():
Test the event_study() function.
"""


df_het = pd.read_csv("pyfixest/experimental/data/df_het.csv")

fit_did2s = event_study(
Expand Down Expand Up @@ -86,4 +87,3 @@ def test_did2s():
)



0 comments on commit 87e5907

Please sign in to comment.