Important: Read this before posting to this forum

  1. This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
  2. There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.

CrossNested Estimation

Ask questions about errors you encouunter. Please make sure to include full details about your model specifications, and ideally your model file.
Post Reply
saeed.shakib
Posts: 2
Joined: 06 Apr 2021, 12:49

CrossNested Estimation

Post by saeed.shakib »

Hello,

My name is Saeed. Recently, I decided to estimate a CrossNested logit model for a household's location choice & dwelling choice behavior after COVID-19 based on stated preference data. I am facing the "Parameter lambda_detac does not influence the log-likelihood of your model!" error.

I went through the manual and documentation and so far tried these solutions but I had no luck.

1- Making sure that all multiple line commands are linked
2- Starting from a simple model (constant only, generic price variable, and asv telecommuting variable, all allocation parameters are set to 0.5)
3- making "workinlogs" true

Here is what I think, and a couple of questions

- The problem is causing because my starting values, but trying various combinations of starting values is not helping so far. Is there a way I can see the calculated probabilities in the middle of the run? then I can identify which utility is creating super small values and I can balance starting points based on them?
- I am also in doubt if this problem is because of my model structure. Because of my restricted availabilities, each person only has one single alternative in each nest and no one ever sees multiple choices that are in the same nest(please see my brief model description below). (On a side note, I fixed the parameter with the issue in the estimation and another error popped up indicating the same problem with the next logsum parameter. I am pretty sure all logsum parameters have the same issue).

Also, by any chance, if anyone has a suggestion to solve this issue I would appreciate it a lot.

Here is a brief intro of my model:
*******************************************************************
My model has 73 alternatives, the "NoRelocation" choice is always available, and 4 dwelling type & region joint choices out of 72 total choices (4 total dwelling types and 18 total regions). In the dataset, in each scenario, each person has encountered the 4 choices randomly. Each person responded to 9 scenarios out of a total of 18 scenarios.

Since each person answered multiple scenarios I used "internormdraws" to capture interpersonal heteroskedasticity. Besides the mixing parameter I have in my model, the reason I have chosen the generalized nested logit model is that I don't want to prioritize dwelling choice over region choice and vice versa. If I use the nested structure I would pre-impose preference of one of the attributes to another which is not realistic.
********************************************************************

On a side note, before coming to Apollo, I tried to estimate this model by using GAUSS. GAUSS debugging indicated that the formulation of the model is correct and matches my calculations by hand, but in MLE GAUSS couldn't invert the Hessian Matrix using the BFGS method.

In GAUSS, if I set the method to BFGS and forced using the approximated hessian instead of the hessian calculation the model would converge but convergence will be always super close to starting values and after checking different starting values I realized the method is not reliable and I migrated to Apollo environment which offers "numderiv" and looks like to be more stable in approximation compared to GAUSS.
stephanehess
Site Admin
Posts: 1042
Joined: 24 Apr 2020, 16:29

Re: CrossNested Estimation

Post by stephanehess »

Saeed

to allow us to help you, we really need to see the code. The message you are getting is telling you exactly what's going wrong, i.e. changes in the parameter are not influencing the LL. Just to make sure though, are you using the latest version of Apollo.

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
saeed.shakib
Posts: 2
Joined: 06 Apr 2021, 12:49

Re: CrossNested Estimation

Post by saeed.shakib »

Stephane!

Thanks a lot for your time and reply. I realized the problem was with the structure of my model. I fixed it and the model is running.

I appreciate your help

Best
Saeed
Post Reply