//
home

Latest Post

Expected switching for the Dirichlet distribution

A valuable tool in choice modelling is the Dirichlet-multinomial distribution. It’s a compound of the multinomial and Dirichlet distributions and it works like this: A choice between N options is modelled as a multinomial distribution with parameters θ1, θ2, θ3 … θN, where the thetas also represent the probabilities of each option being chosen. For … Continue reading »

  • Quite a handy couple of lines of code to subset a list in R to just those elements which meet a certain condition. Here's an example to return only those elements of a list which are a certain class. Thanks to this StackOverflow answer.
Follow

Get every new post delivered to your Inbox.

Join 392 other followers