I have been working on a hierachical mixed effect multinomila choice model. The dataset is not huge, around 20,000 obs, so I guess it is doable using bayesian.
I know it is going to take a huge amount of time before hand. I coded the model using a matrix form without any loops, and also avoided using any complicated distributions.
I ended up finding that avoiding using loops didn’t decreases the running time significantly. I tried on a subsample of 260 obs using 4 chians 1500 iterations. The time consumed for coding without loop is around 8 hours and with loops is around 10 hours, which makes no sense to me. Usually in R, matlab or any other softwares avoiding loops saves a lot of time.
That’s also to say, it will take “forever” to fit the whole dataset. I tried to find answers in the user manual but found nothing.
I would like to know where the majority of time is spent and how to improve the efficiency. I will appreciate if you could give me any suggestions or feedbacks.
Thanks in advance,
stan2.txt (3.1 KB)