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
26 May 2023, 16:36
Forum: Post-estimation analysis/use of results
Topic: WTP for mixed logit with random parameters
Replies: 24
Views: 33215

Re: WTP for mixed logit with random parameters

Hi, The function apollo_deltaMethod will not take into consideration sigma_A2 and sigma_A3 unless you specifically include them in the expression. So when you write: deltaMethod_settings=list(expression=c(WTP_A2="(mu_A2/b_price)", WTP_A3="(mu_A3/b_price)")) apollo_deltaMethod(mod...
by dpalma
26 May 2023, 16:22
Forum: Errors during model validation and/or estimation.
Topic: Error in if (!test) { : missing value where TRUE/FALSE needed when adding workInLogs=TRUE in apollo_control
Replies: 5
Views: 4681

Re: Error in if (!test) { : missing value where TRUE/FALSE needed when adding workInLogs=TRUE in apollo_control

Hi Jie, I got your data and script. Your model is not identified. The problem is that no one chooses alternative NB, as detailed below: WARNING: Some alternatives are never chosen in your data! Overview of choices for MNL model component : alt1 alt2 NB Times available 1168.00 1168.00 1168 Times chos...
by dpalma
26 May 2023, 16:08
Forum: Post-estimation analysis/use of results
Topic: Out of sample tests
Replies: 7
Views: 7890

Re: Out of sample tests

Hi J, The cross-validation routine in Apollo (apollo_outOfSample) only calculates the LL of each model in- and out-of sample for each repetition, but it does not calculate any measure of fit such as first preference recovery or market share recovery. But what apollo_outOfSample does do is store all ...
by dpalma
22 May 2023, 17:22
Forum: Errors during model validation and/or estimation.
Topic: Error in if (!test) { : missing value where TRUE/FALSE needed when adding workInLogs=TRUE in apollo_control
Replies: 5
Views: 4681

Re: Error in if (!test) { : missing value where TRUE/FALSE needed when adding workInLogs=TRUE in apollo_control

Hi, About workInLogs, we are looking into it, but for your case, I do not think you need it, so I would avoid using it. The current problem is probably caused by some remnant identification issue. However, it is very hard to diagnose it without access to your data. If you can, send your data and mod...
by dpalma
20 May 2023, 16:40
Forum: Errors during model validation and/or estimation.
Topic: Error in if (!test) { : missing value where TRUE/FALSE needed when adding workInLogs=TRUE in apollo_control
Replies: 5
Views: 4681

Re: Error in if (!test) { : missing value where TRUE/FALSE needed when adding workInLogs=TRUE in apollo_control

Hi, I cannot see any syntax mistake in your code, but I am under the impression that you are over-specifying your model. Remember that for categorical variables with L levels, you need L-1 coefficients. For example, if attribute efficiency hast 4 levels (0, 1, 2, and 3), then you should only include...
by dpalma
20 May 2023, 16:24
Forum: Errors during model validation and/or estimation.
Topic: Errors when estimating a latent variable model
Replies: 6
Views: 4737

Re: Errors when estimating a latent variable model

Hi Ren, I applied the changes I mentioned in the previous post to your code, and it is running now. Besides moving the "+" signs to the lines above in apollo_randCoeff, I had to remove (comment out) several parameters because they were not influencing the likelihood. See the code below. # ...
by dpalma
19 May 2023, 16:08
Forum: Errors during model validation and/or estimation.
Topic: Errors when estimating a latent variable model
Replies: 6
Views: 4737

Re: Errors when estimating a latent variable model

Hi Ren, In R, when you are writing an expression across multiple lines, you need to put the connecting operator at the end of an incomplete line. For example, the following expression: x = 2 + 3 + 5 Will cause x to contain the value 10. Instead putting the connecting operator in the second line, as ...
by dpalma
19 May 2023, 14:32
Forum: Errors during model validation and/or estimation.
Topic: Errors when estimating a latent variable model
Replies: 6
Views: 4737

Re: Errors when estimating a latent variable model

Hi Ren,

Please send it to both
  • S.Hess [at] leeds.ac.uk
and
  • D.Palma [at] leeds.ac.uk
Best wishes
David
by dpalma
19 May 2023, 11:47
Forum: Estimation results
Topic: Error in length(apollo_inputs$apollo_scaling) > 0 && !is.na(apollo_inputs$apollo_scaling)
Replies: 2
Views: 4108

Re: Error in length(apollo_inputs$apollo_scaling) > 0 && !is.na(apollo_inputs$apollo_scaling)

Hi, Thank you for letting us know about this issue. This is indeed a bug in v0.2.8. We will fix it in the next official release, but in the meantime, I created a new version where the bug is fixed. You can download this new version from the links below. Choose the version for your computer's operati...
by dpalma
18 May 2023, 13:47
Forum: Model specification
Topic: MNL for residential choices
Replies: 4
Views: 4585

Re: MNL for residential choices

Hi Lola, From looking at your code, I reckon that your deterministic utility functions are as follows: V_j = a + b_z*z + b_x*x_j Where j is the index of the alternative, and z are sociodemographic characteristics of the respondent. The problem with this formulation is that z variables are the same a...