0

Discrete Choice Analysis with Python. Generally, there are two formats for representing regression data:

  1. long format
  2. wide format

Long format features a row for each potential option, plus a Y column with either 0 or 1 based on the choice. Wide format has only one line per person (survey respondent), and the Y comprehends all the features that are selected and the X comprehends all the product alternatives.

Example Long

person answer   Y ~ x1     x2    
1      1        0   green  large 
1      1        1   red    large
1      2        1   green  small
...

Example Wide

y1     y2     ~ x11     x12    x21     x22    
green  large    green  large   red    large
green  small    green  small   red    small
...
  1. Is my description correct?
  2. does statsmodel mlogit use the wide format here described?
Roland Kofler
  • 1,332
  • 1
  • 16
  • 33
  • It uses neither. I think the examples are not supported. See my answer at http://stackoverflow.com/questions/34548375/multinomial-conditional-logit-regression-why-statsmodel-fails-on-mlogit-package – Josef Feb 10 '16 at 19:46
  • 1
    you write: "the parameters differ across choices but not the explanatory variables" what are the parameters? does that mean that the mlogit function is not supporting my usecase of choice based conjoint? ( oh my god its all so complicated. ) – Roland Kofler Feb 10 '16 at 20:50

0 Answers0