jhelvy / logitr

Fast estimation of multinomial (MNL) and mixed logit (MXL) models in R with "Preference" space or "Willingness-to-pay" (WTP) space utility parameterizations in R
https://jhelvy.github.io/logitr/
Other
42 stars 15 forks source link

Efficiency improvements #18

Closed jhelvy closed 3 years ago

jhelvy commented 3 years ago

Made all of the logit and gradient functions a bit faster and removed data.table dependency. Also added some stability improvements by adopting a variation of the logit fraction: Prod_t { 1 / (1+ Sum_j [exp(V_jt - V_*t)] }, where * is the chosen alternative. The basic MNL is now quite fast, though mixed logit is still relatively slow (analytic gradient is about the same as numeric approximation in terms of speed). Bumped to v0.2.5.