Skip to content

Slight Mis-Interpretation of Discrete Choice Theory #617

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

Open
mitch-at-orika opened this issue Dec 7, 2023 · 3 comments
Open

Slight Mis-Interpretation of Discrete Choice Theory #617

mitch-at-orika opened this issue Dec 7, 2023 · 3 comments

Comments

@mitch-at-orika
Copy link

Discrete Choice and Random Utility Models:
Notebook url:

Issue description

Firstly thanks for putting this up, its a great effort @NathanielF something that took me ages to figure out and your example will be a great resource for others going forward. I wanted to highlight that In discrete choice models you dont typically set the whole utility to zero for one alternative you just set one of the contants to zero.
Refer to page 21 of Train Book Ch2 for why - its about the identification issue.

I do acknowledge though that it isnt uncommon to do it like you have done as per this example: BAPs multinomial_ppcs that does set everything to zero for one class.

My issue would be that the model is then ignoring the Xs in that alternative. Also, as you articulate well, discrete choice is being nuanced in how the utility is expressed per alternative and saying one must be zero is killing that.

Expected output / Proposed solution

I think the first example (no contants) should just have utility like other alternatives.

then second one where you bring in contants you can either just
u4 = 0 + beta_ic * wide_heating_df["ic.gr"] + beta_oc * wide_heating_df["oc.gr"]
or concatenate a zero onto the alpha if you want to do it as a tensor op like Alex did in the Multinomial PPCs example.

Thanks again.

@NathanielF
Copy link
Contributor

Thanks for thinking through this @mitch-at-orika !

Would you like to open a PR demonstrating the difference in the specification? In particular it'd be interesting to discuss differences in interpretation where relevant.

@mitch-at-orika
Copy link
Author

I dont do this PR on public repos often... I hope I got it all right but there is a PR up there now. Results of the option with no constant are better and results of the example with constants are ~ same maybe a bit worse. The marginal rate of substitition calc goes from 2 -> 0.7. Tried comparing with the mlogit example I think they are both a bit different. Hope this helps, let me know if I need to do the PR differently better. Also keen to talk through implications. Cheers, Mitch

@NathanielF
Copy link
Contributor

Just FYI @mitch-at-orika finally updating the PR here with the suggested changes: #781

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants