Comments (5)
Some design considerations for internal processing:
Assume the following model formula: fml = "Y + Y2~ X1 | csw0(X3, X4)
.
Currently, information on model variables is e.g. encoded in self.var_dict
in the following way
>>> self.var_dict
{'0': ['Y', 'Y2', 'X1'], 'X3': ['Y', 'Y2', 'X1'], 'X3+X4': ['Y', 'Y2', 'X1']}
and in self.fml_dict
as
>>> self.fml_dict
{'0': ['Y~X1', 'Y2~X1'], 'X3': ['Y~X1', 'Y2~X1'], 'X3+X4': ['Y~X1', 'Y2~X1']}
With instruments, the formula might look as fml = "Y + Y2~ X1 | csw0(X3, X4) | X1 ~ Z1"
. It is likely preferable to use a "clearer" data structure to save the information above. E.g.
{'0': [{"depvar": "Y", x_vars = ["X1"], z_vars = ["Z1"]}, {{"depvar": "Y2", x_vars = ["X1"], z_vars = ["Z1"]}}, "X3": ...].
from pyfixest.
Status:
- In dev branch, IV-Estimator is implemented + associated SEs (iid, HC1-3, CRV1).
- some tests against fixest are implemented & pass
- still to be done: error handling + tests for multiple estimations
Also, formula syntax currently deviates from fixest. For models without covariates, fixest syntax is
feols(Y ~ 1 | fe | endogvar ~ instrument)
while pyfixest is
Fixest(df).feols("Y ~ endogvar | fe | endogvar ~ instrument").
After tackling all points above, I will merge the PR and implement the 2SLS estimator in a separate PR.
from pyfixest.
Basic IV support added with version 0.5.
from pyfixest.
2SLS estimator now implemented in the dev branch.
from pyfixest.
To do:
- currently, there is a minor deviation to fixest syntax. For models without any covariates, fixest syntax is
feols(depvar ~ 1 | fe | endogvar ~ instruments)
, while pyfixest requiresfeols(depvar ~ endogvar | fe | endogvar ~ instruments)
. Align pyfixest syntax with fixest. - multiple estimation syntax does not work in the first part of the three-part formula, i.e.
depvar ~ csw(X1, X2) | fe | endogvar ~ instrument
leads to a bug - add tests for IV with multiple estimation
- add F-test (for first stage and in general)
- some documentation improvements are definitely possible
from pyfixest.
Related Issues (20)
- Inference: Support `fixef_k = "nested"` for small sample correction in `ssc()` for identical standard errors with `fixest` HOT 1
- Wildboottest: Incorrect Initiation of R vector -> incorrect results
- Contributing Documentation does not show full code blocks HOT 2
- Contributing Documentation Formatting Issue
- Extract covariance matrix from regression object HOT 8
- F-test in pyfixest HOT 9
- narwhals = Pandas + polars + ... HOT 5
- Helping demean() Fail Gracefully - Add a'fixef_iter' argument to feols() and fepois() HOT 1
- Examples Layout Docs HOT 3
- Feiv : More diagnostic tests on the first stage regression need to be added HOT 2
- Add note on `wald_test` method to `quickstart` (or even a new notebook)? HOT 2
- Add "lean" argument to `feols()` and `fepois()` HOT 4
- Publish `pyfixest` on conda
- Add `solver` argument to `feols()`, `fepois()` APIs HOT 5
- Support for weights as an optional parameter for did2s? HOT 4
- Add benchmarks against `linearmodels` and `fastreg` HOT 8
- Add default IV Diagnostics to `pf.summary()` and `pf.etable()` HOT 1
- installing via pip broken by stargazer HOT 4
- Adding Standard Error of Prediction HOT 6
- BUG: coefplot() and iplot() show only point estimates, no confidence intervals HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyfixest.