Speeding up a hierarchical multinomial logit model

That sounds slow. It might be easiest if you try it out in our product called Displayr. We have a feature called MaxDiff which uses an updated version of the stan code:
https://www.displayr.com/
https://www.displayr.com/hb-maxdiff-displayr/

1 Like

Interesting. Thank you for the link, but I’m trying to get this to work in my established workflow. I will probably create a new topic, making sure that I have the data formatted correctly, rather than keep bothering you on this thread. Thank you!

I posted my own question, with all my data and R code, here: Troubleshooting a "MaxDiff" hierarchical multinomial regression I would very much appreciate if you could take a look at my code and see what I may be doing incorrectly!

Is there a chance you can upload how you transformed the Sawtooth .cho file to get the right structure for the data stan command? Sawtooth normally has one choice task for both best as well as worst. Did you merge them or how did you do it? Thanks a lot.

@JoshSchramm94 I didn’t use a cho file in this example but the file format is documented in the link below and it is just a matter of transforming the data. There is still the same number of choice tasks but 2 choices (best and worst) per task.

@JustinYap thank you very much for your reply and taking your time. Highly appreciate. I worked with the .csv output and it worked out fine. Regarding the .stan script.

K is the number of total items in the MaxDiff, right? I include all items in the model and set the first one to zero as reference (Theta[1] = 0;) level, correct? So for your example with 6 MaxDiff items (Item1:Item6), I would include all 6 attributes in the model matrix and set the parameter K to 6, right?

And another question regarding anchored MaxDiff: I have seen this post by Q. The adaptation for the indirect anchoring is totally clear to me. Do you still use the same .stan script and define YB as well as YW? And I assume you just add the anchor as attribute or how would the choice tasks actually look like?

And what about having a buy vs. no-buy option for each item at the end of the MaxDiff questionnaire, similar to direct anchoring in Sawtooth, p. 5. How would you actually alternate the choice tasks for this example? I assume there is some similarity with the part “Setting up the combined MaxDiff with ratings in Q”. Would you change the score of those items that are an purchase option 1 if they are 0 or -1 and change them to 2 if they were already chosen as best? Maybe you can give some hints about the way the direct and indirect anchored questions are coded in Q to be run in rstan.
Once again, thanks a lot for your help.

@JoshSchramm94 yes I believe you are correct

Yes I believe you are correct.

As for anchored MaxDiff, we do not use stan for that feature in Q (this was written before we used stan), so I’m not able to answer your questions unfortunately.

@JustinYap thanks a lot for your reply. Then I will keep on trying and searching. Thanks so much and all the best.