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. We check the forum at least twice a week. It may thus take a couple of days for your post to appear and before we reply. There is no need to submit the post multiple times.

apollo_outOfSample discrepancy in description of estimation and validation sample

Report bugs or highlight issues with Apollo functions. At a minimum, please include the part of the output where you believe the bug is manifested. Ideally, please share your model file.
Post Reply
saumitra
Posts: 2
Joined: 24 Jul 2024, 21:30

apollo_outOfSample discrepancy in description of estimation and validation sample

Post by saumitra »

Hello,

There seems to be a discrepancy in the description of the split between the estimation sample and validation sample when using apollo_outOfSample. I specified 25% of the sample to be used for validation. In the output, it says that 25% of the individuals will be used for estimation, but then when I look at the number of individuals specified for estimation and for forecasting, the number of individuals for validation (forecasting) corresponds to 25% of the sample (182/728). This is the code I used for the out of sample test:

Code: Select all

apollo_outOfSample(apollo_beta, apollo_fixed,
                   apollo_probabilities, apollo_inputs,
                   outOfSample_settings = list(nRep=10,
                                               validationSize= 0.25))
This is the output I received when I ran the code:
Testing likelihood function.
10 separate runs will be conducted, each using a random subset of 25% of individuals for estimation, and the remainder for
validation.
Number of individuals
- for estimation : 546
- for forecasting : 182
- in sample (total): 728
I am assuming that it is a typo in the description and that the correct validation(for forecasting) sample size is used, 25% of the sample for validation, as specified in the code (and not 25% for estimation). But could you please confirm this?

Based on the Apollo manual, it seems that there is a typo in the description of percentage "25% of individuals for estimation" and the number of individuals shown is the correct number used for the actual estimation.

In the Apollo manual this is the example code on page 145:
apollo_outOfSample(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)
2 10 separate runs will be conducted, each using a random subset of 90% for estimation and the
,! remainder
3 for validation.
4 Number of individuals
5 - for estimation : 349
6 - for forecasting : 39
7 - in sample (total): 388
I am using V.3.2 of Apollo. Perhaps this has been fixed in V.3.3. However, I am currently running my models in V.3.2

Thank you
stephanehess
Site Admin
Posts: 1355
Joined: 24 Apr 2020, 16:29

Re: apollo_outOfSample discrepancy in description of estimation and validation sample

Post by stephanehess »

Hi

thanks for spotting this. It was indeed a typo. This will be fixed in the next release

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Post Reply