Closed mattwigway closed 1 month ago
Thanks for noting this, @mattwigway. This has been a longstanding issue in Larch as it sets the code for the "root" of the nested logic model to 0 by default, which conflicts with having an alternative also numbered zero. I've added some code to detect this on model initialization and change the root node to -1, which should hopefully fix the problem.
larch
fails when one of the alternatives is numbered zero. I ran into this trying to build a binary logit model withlarch
(to demonstrate to my students that the binary logit is a special case of the multinomial logit). This code fails with the message below:Error:
This code works:
The data I used is available in the code + data package for my discrete choice modeling course