Comments (3)
Hi, indeed, there's currently no tool to extract the marginal effects in the package.
But marginal effects are in the pipelines, although not quite there yet.
What you suggest is just a subsample of all possibilities that a function computing the marginal effects should have (i.e. it should be valid for any family, provide elasticities and semi-elasticities, not only be computed at means but for given values too).
Further, I should also ensure integration with other functions of the package (in particular summary
and etable
for exports).
Although it's straightforward to implement just what you suggest, when I create the real function which is more general, I would have to redesign the internal code for it to be simple and efficient. I would also have to add, modify and redefine the arguments of the original (small) marginal effects function -- and changes in arguments across package versions is really something that I don't like.
So I can't implement what you suggest at the moment because for me it would mean double work + headaches.
In your situation, I suggest to implement it yourself. For these families it's pretty straightforward since there are closed form solutions.
To finish, another reason I didn't implement marginal effects in the first place is that I don't recommend using my package so much for logit/probit models because of the incidental parameter problem (IPP). This implies systematic biases in the coefficients (for short panels) and would require to be solved, either with a jackknife or with an analytical bias correction (btw I'll implement the bias correction one day--but not yet).
I recommend instead to use the alpaca
package. I shall also drop the benchmark with the logit in the README of the package because it can be misleading (at least users need to be aware of the IPP which is often not the case).
from fixest.
I'm closing it then.
from fixest.
Following demand from other users, I've written some code that computes the marginal effect at means.
It's not in the package because very meagre but it's functional. You can find it here: https://github.com/lrberge/fixest/blob/master/_Code%20snippets/fixest_snippets.R
It's just at means at the moment. Feel free to improve/extend it!
from fixest.
Related Issues (20)
- How to use bias-reduced linearization (BRL) / CR2 - adjusted standard errors with feols? HOT 2
- R Session Aborted with IV when all variables are collinear with the fixed effects
- Feature request/bug: predict/fitted for multiple lhs regressions
- Accessing the within rhs covariates HOT 2
- find weights column within data HOT 2
- run the same model 3 times, the result changes HOT 4
- slicing results using the new fixest_multi class are not of class "fixest" when it seems like they should be
- Abadie et al (2023) standard errors? HOT 6
- fixest2::feglm(mpg ~ wt | as.integer(cyl), data = mtcars) :
- `nthreads = 1` not working with clustered SEs HOT 1
- Feature Request: adding `interaction.order` argument to `coeftable`
- Function to extract name of dependent variable HOT 1
- Multiple Treatment Types in Staggered (`sunab()`) HOT 1
- fepois with offset HOT 2
- Benchmark against Linearmodels.AbsorbingLS
- Option to have na.action=na.exclude HOT 1
- Speed of sandwich (HC2 or HC3) for larger datasets HOT 2
- Wald test for equality of coefficients HOT 2
- Problem with fepois out-of-sample prediction when using offset HOT 2
- Is it possible to have `signif.code` in `setFixest_etable()`? 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 fixest.