Mixed Logit: Zero variance in normally distributed parameter

85 views
Skip to first unread message

Moritz Wussow

unread,
May 16, 2022, 2:46:04 AM5/16/22
to Biogeme
Dear Biogeme Community,

I am trying to estimate a mixed logit model on my own dataset that includes alternative specific constants (one of them normalized to zero), one static (i.e., not distributed) parameter and one normally-distributed parameter. I am closely following the swissmetro examples "05normalMixture" and "05normalMixtureIntegral". 

My results indicate that the variance of the normally distributed parameter is essentially zero, which seems very astonishing given my apriori assumptions about taste heterogeneity in the sample. Therefore, I suspect that I might have overlooked something important.

I would highly appreciate any hints about what I could be doing wrong.

Thanks in advance and best wishes,
Moritz


Bierlaire Michel

unread,
May 16, 2022, 3:35:26 AM5/16/22
to mwuss...@gmail.com, Bierlaire Michel, Biogeme

On 16 May 2022, at 04:19, Moritz Wussow <mwuss...@gmail.com> wrote:

Dear Biogeme Community,

I am trying to estimate a mixed logit model on my own dataset that includes alternative specific constants (one of them normalized to zero), one static (i.e., not distributed) parameter and one normally-distributed parameter. I am closely following the swissmetro examples "05normalMixture" and "05normalMixtureIntegral". 

My results indicate that the variance of the normally distributed parameter is essentially zero, which seems very astonishing given my apriori assumptions about taste heterogeneity in the sample. Therefore, I suspect that I might have overlooked something important.

Three possibilities: 
- the starting value for estimation is too close to zero, and the algorithm is trapped in a local optimum,
- not enough draws,
- the normal distribution is not appropriate.

It can actually be a combination of those... 

 


I would highly appreciate any hints about what I could be doing wrong.

Thanks in advance and best wishes,
Moritz



--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/aafce198-a6bd-4f9a-8061-4ca6f9d4d400n%40googlegroups.com.

Moritz Wussow

unread,
May 17, 2022, 2:44:50 AM5/17/22
to Biogeme
Dear Prof. Bierlaire,

thank you for the prompt reply! Regarding your points:
- the starting value for estimation is too close to zero, and the algorithm is trapped in a local optimum, (=> I set the starting value of the sigma parameter to 1, which seemed reasonable, given that the mu paramter was estimated ~2.1 by the Logit model)
- not enough draws, (=> I estimated the model with up to 100k draws as well as by calculating the integral)
- the normal distribution is not appropriate. (=> I also implemented the log-normal model which runs into the same problem.)

I am attaching a copy of the results (Normal.html), B_OC is the parameter of interest.
Naturally, I became sceptical of whether my assumption about the paramter being distributed within the sample would hold. Therefore, I estimated a Logit model with an interaction between the parameter and a time dummy variable (B_OC_Before2020) that I expected to explain some variation in the parameter (see attached Logit_Interaction.html). As shown, including the interaction and improves Log-Likelihood, which I interpret as evidence for the parameter to be in fact distributed within the sample, i.e., the sigma parameter in the mixed-logit should be significantly different from zero.

Could you please advice me on what I might be overlooking?

Thanks in advance,
Moritz

Logit_Interaction.html
Normal.html

Bierlaire Michel

unread,
May 17, 2022, 11:33:45 AM5/17/22
to mwuss...@gmail.com, Bierlaire Michel, Biogeme

On 17 May 2022, at 00:27, Moritz Wussow <mwuss...@gmail.com> wrote:

Dear Prof. Bierlaire,

thank you for the prompt reply! Regarding your points:
- the starting value for estimation is too close to zero, and the algorithm is trapped in a local optimum, (=> I set the starting value of the sigma parameter to 1, which seemed reasonable, given that the mu paramter was estimated ~2.1 by the Logit model)

Well, there is no way to say what a reasonable value is. I would try something like 100 or 1000. 

- not enough draws, (=> I estimated the model with up to 100k draws as well as by calculating the integral)

Indeed, it should be OK. 

- the normal distribution is not appropriate. (=> I also implemented the log-normal model which runs into the same problem.)

Well, there are other distributions, with finite support, and asymmetric. But, if the parameter should indeed be distributed (as you believe), the normal distribution should actually catch that. 

So my best guess is the starting value...

To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/124e6e4b-c9c1-4bf9-9412-c1fdb92504c3n%40googlegroups.com.
<Logit_Interaction.html><Normal.html>

Moritz Wussow

unread,
May 19, 2022, 1:29:37 AM5/19/22
to Biogeme
Could it be that I am facing this problem because the attributes that are associated with the alternatives vary across individuals? 
That is, my specification of the observed utility of alternative j for individual i is V_ij = ASC_j + B_1 x X_1i + B_2 x X_2i and I am trying to analyze the distribution of B_2 across individuals.
Is this violating an assumption that underlies the mixed logit model and could therefore explain why I get the erronous parameter estimate of zero for sigma?
Reply all
Reply to author
Forward
0 new messages