pymc-examples icon indicating copy to clipboard operation
pymc-examples copied to clipboard

Slight Mis-Interpretation of Discrete Choice Theory

Open mitch-at-orika opened this issue 7 months ago • 2 comments

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.

mitch-at-orika avatar Dec 07 '23 20:12 mitch-at-orika