-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add McFadden's choice model #1
Comments
I saw the code from the Discourse post and had planned to go over it in the next couple days. Thanks! I have a few improvements I haven't push just yet and will check if I it covers |
Definitely not worth it to hand-code the Hessian! |
From my understanding the steps to implement McFadden would be the following,
or
I think either approach should eventually yield the same functionality. I took a look at the code and got some of it, but not all. Could you post some references that might help me understand the code/implementation or any edits to comment the code for make it more transparent would help. If you are attending JuliaCon we could also meet then to further this development. |
The functionality we need currently has a bug, but the The route I've taken is "clogit --> asclogit" but you're correct that I need to add some more annotations. I will do that soon and point you to the right place. |
@matthieugomez, could FixedEffects.jl support GLM features absorption? Stammann (2018) has the algorithm and there is an implementation in CRAN's alpaca. |
No, sorry, I don’t have the time to do it. |
No worries, if I end up implementing it or if/when it happens I will let you know in case you want to port it there. |
This conversation is above my level, but does https://github.com/jmboehm/GLFixedEffectModels.jl now implement GLM features absorption? Could that help with |
I would have to take a look at it. Potentially. |
Thank you for this entire package and no worries! The context on my side is that I am looking for a way to include fixed effects (not too large, but too much to type by hand) in a discrete choice model. I've looked at DiscreteChoiceModels.jl but I don't know how to do that there. This is why I found this thread interesting. |
I have written code to estimate McFadden's choice model (
asclogit
in Stata). I am not sure how to incorporate it into your package, though.What I had in mind was to add it as another method in
solvers.jl
. However, I don't quite follow the custom types you've created. Also, in McFadden's choice model,Z
is the array that stores alternative-specific variables, so one would need to clarify that that's not referring to an instrumental variable for that method.If you're interested in seeing the code I have so far, here's a gist that includes it. It exactly replicates the example from the Stata help entry for
asclogit
.Finally, I think your ordered logit code can be improved by making use of the
fg!
method inOptim
. However, I'm still trying to figure this out myself (see here), so I can't help you just yet.The text was updated successfully, but these errors were encountered: