Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ai_pr_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ jobs:
sandbox: read-only
safety-strategy: drop-sudo
# Recommended by OpenAI for review quality/consistency:
model: gpt-5.4
model: gpt-5.5
effort: xhigh

- name: Post PR comment (new on every event except initial open)
Expand Down
15 changes: 1 addition & 14 deletions diff_diff/estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1604,22 +1604,9 @@ def fit( # type: ignore[override]
X = np.column_stack([X, working_data[cov].values.astype(float)])
var_names.append(cov)

# Add fixed effects as dummy variables.
#
# MPD's design already absorbs the time dimension via non-reference
# period dummies (the `period_<X>` columns above) and the treatment-
# period interactions. If the caller passes the same column as a
# fixed effect (either explicitly or via the absorb -> fixed_effects
# auto-route for HC2/HC2-BM), the resulting `<time>_<X>` dummies
# would be perfectly redundant with the existing period dummies,
# NaN'd by `solve_ols`'s rank-deficiency handling, AND collide on
# name with the event-study columns in `coef_dict` (silently
# collapsing the dict and breaking the coefficients-vs-vcov
# alignment that downstream consumers rely on). Skip those FEs.
# Add fixed effects as dummy variables
if fixed_effects:
for fe in fixed_effects:
if fe == time:
continue
dummies = pd.get_dummies(working_data[fe], prefix=fe, drop_first=True)
for col in dummies.columns:
X = np.column_stack([X, dummies[col].values.astype(float)])
Expand Down
Loading