Mixed Logit Model


@jeremy.koster - Could you provide some summary stats re: your data? How often do fisherman choose the same spots? Do the same people go to the same places or do they alternate? Do they often go to particular places around the same time or do they scatter across the 10 possible sites? If they coalesce in particular places at one (or a few) at a time, is there a pattern to which these places are (e.g. weather, fish migration patterns, etc.)?

There are a number of likely helpful models in economics for your problem, but which one depends on the answers to the above. I’d be happy to suggest something more concrete upon hearing more :)


Thanks, Jim. If you and Bob or others know researchers who are well-versed in good models for these data and open to dabbling in an anthropological problem, I’d be glad to connect them with the lead investigators on the project. I’d love to see more choice models in anthropology, which doesn’t have much experience with such approaches.


Thanks shoshievass,

As a disclaimer, the data were collected by a researcher in Grenada, and I am not the one who is best-positioned to summarize the data. That said, the basic details are that all fishing activities by approximately 13 boat captains were documented for about one year. The captains have the option of choosing from about 9 fishing sites, but there are rules about the order in which boats can fish at these sites, largely determined by queuing according to time of arrival. The outcomes (n = 998) of each fishing episode are known (in terms of how much fish were caught by boat j) – which is a positively skewed distribution – along with the date and time and the length of the fishing episode. But there is no way to know what the expected productivity of unexploited sites would be at time t. The sites are all close enough that weather should be similar across sites, but there may be ecological aspects of the bays that mean some sites are more or less productive at different times.

After fishing at a site, captains have the option of getting in line for another turn at that site, or switching to a different site. Based on what I’ve seen of the data, these decisions could be reconstructed (with some moderate coarseness in the time frames at which these decisions were documented). I haven’t looked too closely at summary statistics, but according to the researchers, it seems common for captains to cluster together at productive sites . . . unless things get too crowded, at which point some will disperse to look for less crowded sites. (Fortunately, it seems that there is no fishing by other captains who were not in the study population, so the distribution of boats at any particular time is knowable, albeit with some measurement uncertainty.)


@richard_mcelreath, author of Statistical Rethinking, is an anthropologist. He’ll probably know what’s up in Anthro, though this seems like a very generic kind of sequential choice problem, which is hardly to say that it’s easy (any inference involving projected discrete choice can get hard due to combinatorics and require dynamic programming algorithms rather than brute force).


Thanks, Bob.

Actually, Richard is a co-author of mine, and these data arrived on my desk via another mutual colleague from our corner of anthropology. In general, choice models are not widely used in our field, but it’s possible that some of my colleagues may have connections to ecologists who have done work on analogous topics (perhaps including the Hidden Markov models that you had recommended previously).


I guess that’s not too surprising given that we’re not exactly all here at random.


I’ll respond properly as soon as I get a chance! (Probably over the weekend - sorry; a bit of a hectic time for me!)


Hello everyone, I just bumped into this blog following the suggestion from jeremy.koster (thanks Jeremy!). I learned a lot from the code shared here (thanks Jim!). One question: has anyone implemented in Stan a model with utility in the WTP-space so that coefficients can be interpreted directly as marginal WTPs for choice attributes, thereby avoiding the problem of indefiniteness of (some) distributions of ratios of random variables?


I am resurrecting this thread because the colleague with fishing data from Grenada (described above) is interested in making a push on the data analysis. I remain convinced that a conditional logit would be a good option for modeling the data.

For someone with prior experience modeling choices in Rstan, I anticipate that the modeling would be reasonably straightforward, and the data could be readied so that the modeling itself is the only remaining task. The main research question is the extent to which the number of other captains already in a particular bay leads the fishing captains to choose among the 10 or so bays where they can fish in Grenada.

In terms of impact, it’s not clear yet where this analysis will eventually get published. If it were an ecological journal (something like Behavioral Ecology perhaps), it would be noteworthy for being one of the first applications of discrete choice models to data of this kind.

Among the users of the board (e.g., @shoshievass and @James_Savage), are there recommendations for potential collaborators?



I haven’t seen anyone do this, but was working on something very similar for some auction analysis recently. Will let you know when I get around to it!


Hey @jeremy.koster! I could be persuaded. Quite a few side-projects at the moment, but if it is as you say down to getting a mixed logit model running, that should be doable. Best email for me is javage@gmail.com



Hi Ric,
I used such a model as an example at the eRum conference in Poznan 2 years ago. See slide 14 and 16 of this presentation (eRum2016_GG.pdf (1.5 MB)). I’ll post something here, but first I need to find the old code…
I’m very interested in choice models in WTP space and would love to get some feedback regarding the implementation.