Page 1 of 1

Error with Hessian calculation in panel MNL

Posted: 11 Jun 2025, 14:59
by Reinhard_BOKU
Dear Apollo friends,

I am working with a large dataset comprising 162,000 observed choices from 624 individuals (~ 260 choices per individual). The choice variable includes three alternatives (0, 1, and 2), with shares of 0.78, 0.12, and 0.10, respectively. So far, this appears quite typical and would not raise any concerns.

However, I encounter a problem even when estimating the constants-only model (i.e. including only two ASCs for alternatives 1 and 2). Apollo fails to compute the Hessian matrix (WARNING: Hessian could not be calculated) and consequently also standard errors and t-values.

Interestingly, when I override the panel structure by treating each observation as independent (using the row-ID as indivID), Apollo does manage to compute the Hessian (after considerable computation time) and returns t-values that are (expectedly) much too high. This outcome suggests to me that the model specification itself is not the issue, and that the failure may be related to how Apollo averages the likelihoods across individuals.

Do you have any insights or suggestions on what might be causing this problem?

Best wishes
Reinhard

Re: Error with Hessian calculation in panel MNL

Posted: 13 Jun 2025, 06:36
by stephanehess
Hi

the issue comes from multiplying togetger such a large number of probabilities at the person level, leading to 0 values in some cases.

Have a look at the discussion in the manual in relation to the workInLogs setting

Stephane

Re: Error with Hessian calculation in panel MNL

Posted: 15 Jun 2025, 10:51
by Reinhard_BOKU
Thanks a lot, that solved my problem.

Best wishes
Reinhard