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.

Search found 190 matches

by dpalma
09 Oct 2023, 17:46
Forum: Post-estimation analysis/use of results
Topic: ICLV model scenario (simulation) analysis
Replies: 4
Views: 22038

Re: ICLV model scenario (simulation) analysis

Hi, In an MDCEV model the amount consumed of each alternative (activity) is your dependent variable, so you cannot calculate the impact of a change in it.I understand you want to understand how a change in consumption in one alternative influences the others, but it cannot be done directly. The only...
by dpalma
25 Sep 2023, 18:42
Forum: Errors during model validation and/or estimation.
Topic: Large (M)MNL - Analytical gradients could not be calculated for all components
Replies: 2
Views: 14481

Re: Large (M)MNL - Analytical gradients could not be calculated for all components

Hi, While Apollo can manage to get analytical derivatives for utilities defined via loops, this functionality is mostly for simple loops. When you use conditionals statements (ifs) inside the loop, it is very likely that Apollo won't be able to get the analytical derivative of that. So it's good tha...
by dpalma
01 Sep 2023, 15:23
Forum: Model specification
Topic: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?
Replies: 8
Views: 71871

Re: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?

Hi Zhao, I am not very familiar with effects coding (I myself always use dummy coding), so not sure what to recommend about it. But if you are including price as a continuous variable in your utility, then its coefficients almost certainly should be negative. About the rho squared, I am afraid there...
by dpalma
01 Sep 2023, 13:07
Forum: Model specification
Topic: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?
Replies: 8
Views: 71871

Re: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?

Hi, Let's consider five types of distributions and their recommended starting values. # ################################################################# # #### DEFINE MODEL PARAMETERS #### # ################################################################# # ### Vector of parameters, including any ...
by dpalma
31 Aug 2023, 13:42
Forum: Model specification
Topic: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?
Replies: 8
Views: 71871

Re: How to define the start value of mu and sigma when adding random parameters to the mixed logit model?

Hi, Usually, I recommend first estimating a simple MNL model and use those estimated parameters as starting values for the mu (mean) of the the mixed logit, while starting their sigma (s.d.) at zero. This is assuming the random coefficients in your mixed model follow a normal distribution. If the ra...
by dpalma
31 Aug 2023, 13:30
Forum: Model estimation
Topic: Why is the estimation of the standard deviation of the error component negative?
Replies: 6
Views: 27006

Re: Why is the estimation of the standard deviation of the error component negative?

Happy to hear applying constraints worked out, and the new value positive value is close in magnitude to the original negative one.

Best wishes
David
by dpalma
31 Aug 2023, 13:28
Forum: Errors during model validation and/or estimation.
Topic: output changed after optimisation
Replies: 9
Views: 58811

Re: output changed after optimisation

Hi, As of today, the current version is v0.3.0. Y can update it using the following line of code: install.packages("apollo") The manual needs to be updated to the latest version, but it will be soon. Anyhow, the instructions to install (or update) Apollo remain the same, regardless what th...
by dpalma
29 Aug 2023, 15:55
Forum: Model specification
Topic: Nested logit model with ranked choice
Replies: 2
Views: 4291

Re: Nested logit model with ranked choice

Hi, I would recommend using an exploded logit but adding error components to introduce correlation between alternatives, approximate a nesting structure. The code below is a modification of example "EL" in the examples page , where I introduced correlation between alternatives 1 and 2. You...
by dpalma
29 Aug 2023, 15:30
Forum: Models and estimation
Topic: Zero inflated negative bonomial hybrid choice model
Replies: 1
Views: 3495

Re: Zero inflated negative bonomial hybrid choice model

Hi, Yes, you can estimate a zero inflated negative binomial model with latent variables in Apollo. But there is no pre-coded negative binomial model likelihood, so you would have to write the likelihood yourself. You can look at section 5.7 for a discussion on how to add new models to Apollo. Altern...
by dpalma
29 Aug 2023, 15:18
Forum: Model estimation
Topic: Why is the estimation of the standard deviation of the error component negative?
Replies: 6
Views: 27006

Re: Why is the estimation of the standard deviation of the error component negative?

Hi, There is nothing wrong with your model. This is a consequence of how Apollo works. In Apollo, you usually define random components as follows: randCoeff[["beta"]] = mu + sigma*draws From a mathematical perspective, if we consider "draws" as a random variable following a symme...