Conversation
|
@kylebutts on one hand, mostly fyi =) But also, some of the code is more or less directly translated from your R package, which I mention in the codebase. I think it would be best practice to actually add your name to the list of package authors (this is what I do with in my R packages if I more or less copy code from another package). What do you think? |
|
I'm not sure how multiple inheritance works in python, but is there a possibility to pass Though, I do see how it's nice to have a single |
|
Hi Kyle, Thanks for offering your help! I might have some questions on reference levels for the event study with leads and lags down the line =) I thought about having a custom |
|
Ah, maybe not as easy as I thought: mapping from an event study interface to calling did2s is fairly straightforward, but not the other way around. But should still be manageable =) |
|
What do you think is hard about making a did2s command? Your code looks pretty generic. From what I can tell, the main change you would need to make is in the vcov part: |
|
Yes, you're right, it's just that the closer time gets to midnight, the faster I type and the worse I think 😅 basically, the steps are the following:
Really not too hard :) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #194 +/- ##
=============================
=============================
☔ View full report in Codecov by Sentry. |
|
lol I'm getting push notifications of each attempt @s3alfisc 😅 godspeed on this |
|
Oh no 🙈 I had my fingers crossed GitHub would stop notifying you after the 10th attempt or so 🙃 sorry about that! I'm definitely done for today 😅 |
* PyFixest 0.10.7: Basic Did2s support (#194) * initial commit * reproduce did2s.r results * add twfe estimator * create treatment var internally * some defensive input checks * acknowledge kyle as copyright holder * create experimental folder * update docs * update version * add did2s function * get event_study() did2s to work again * delete did2s function * add basic tests * patch version * delete pyaches * update news * update starting message * update readme * update pyproject.toml * ci tests on mac as fixest already compiled * test on windows * back to testing on linux * first install python, then R deps * fix yaml syntax * yaml is too hard * fix typo * PyFixest 0.10.8: More flexible DID2s support (#206) * initial commit * reproduce did2s.r results * add twfe estimator * create treatment var internally * some defensive input checks * acknowledge kyle as copyright holder * create experimental folder * update docs * update version * add did2s function * get event_study() did2s to work again * delete did2s function * add basic tests * patch version * delete pyaches * update news * update starting message * update readme * update pyproject.toml * ci tests on mac as fixest already compiled * test on windows * back to testing on linux * first install python, then R deps * fix yaml syntax * yaml is too hard * some work towards a more flexible API * get did2s function prototype to run * event_study() and did2s() both run through * add examples to did2s() and event_study() * more tests for did2s * pass tests * two reference levels * fix small bug re _drop_ref * get did2s() to run * fix did2s vcov bug * add tests * update did example * further updates * update i-tests * bump version and update readme * readme tweaks * update news * update readme * update readme * dont gitignore figures folder * PyFixest 0.8.10.1: add black workflow (#207) * add black action * run black * revert notebook * PyFixest 0.10.8.2: close #208 (#209) * check for did2s if treatment is boolean * update docs * ci only when push to master * bump version * small fixes * formatting * PyFixest 0.10.9: Improve etable() (#210) * first step to prettier etable * add tabulate dependency, fix etable fixef bug * fix bug with no fixed effects * fix no model has fixef exception * bump poetry version * fix hline placement bug * formatting * make plot nicer * add vcov info * reformat * reformat * update news * PyFixest 0.10.10 (#212) * attempt to fix #211 * cleanup * clarification * fix i() bug for i(var), not for i(var1, var2) * add drop_intercept argument to feols, fepois * fix error with did2s inference * add error when 0 or -1 in first stage * fix tests, output warning for i(var1, var2) syntax * format code * update figure + fix small bug * no 0 in second stage did test * bump version * deprecate i(var1, var2) syntax, update news * format * bring back i(var1, var2) * format * fix i(var1, var2) interaction - unit tests pass * formatting * bump version * Fix poisson bug (#215) * update docs * add _depvar attribute to Feols object * use _depvar attribute * move separation checks out of Fepois to fix #138 * revert changes to performance method * temporarily do not report r squared metrics * fix separation bug #138 * formatting * update docs * njit and parallelize crv1 inference #204 * formatting * bump version
* initial commit * reproduce did2s.r results * add twfe estimator * create treatment var internally * some defensive input checks * acknowledge kyle as copyright holder * create experimental folder * update docs * update version * add did2s function * get event_study() did2s to work again * delete did2s function * add basic tests * patch version * delete pyaches * update news * update starting message * update readme * update pyproject.toml * ci tests on mac as fixest already compiled * test on windows * back to testing on linux * first install python, then R deps * fix yaml syntax * yaml is too hard
event_study()function, which supports Difference-in-Differences estimation via two-way fixed effects and Gardner's two-stage estimator (2021).feols("Y ~ 0 | f1).To Do's:
i()operator currently only supports one reference level, do I have to adjust it to add a second level? Check.Example: