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.

Bootstrap estimation

Ask questions about post-estimation functions (e.g. prediction, conditionals, etc) or other processing of results.
Post Reply
psalazar
Posts: 13
Joined: 22 Sep 2022, 13:56

Bootstrap estimation

Post by psalazar »

Dear all,

I ran my MNL models and would like to use bootstrap estimation. I checked the Apollo manual (pp. 129), but I don't know how to add the bootstrap_settings (nRep) option to use 1000 bootstrap samples (default is 30).

Could you please give me an example (code syntax)? Many thanks!

Best wishes,

Pamela.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Bootstrap estimation

Post by stephanehess »

Hi

sorry for the slow reply. You can see all you need via ?apollo_bootstrap

you then just need e.g.

Code: Select all

apollo_bootstrap(
  apollo_beta,
  apollo_fixed,
  apollo_probabilities,
  apollo_inputs,
  bootstrap_settings = list(nRep = 1000)
)
Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
psalazar
Posts: 13
Joined: 22 Sep 2022, 13:56

Re: Bootstrap estimation

Post by psalazar »

Hi Stephane,

Many thanks!

May I ask you for suggestions when using bootstrap estimation with mixed logits? each model is taking various days to run.

Best wishes,

Pamela.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Bootstrap estimation

Post by stephanehess »

Pamela

there's not much you can do about that. With more complex model, each run takes longer of course.

What is your aim in using bootstrap estimation?

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
psalazar
Posts: 13
Joined: 22 Sep 2022, 13:56

Re: Bootstrap estimation

Post by psalazar »

Hi Stephane,

Many thanks for your response. I am running bootstrap estimations because to determine the relative “weight” of the attributes, I calculated relative scores, and I want to obtain a 95% confidence interval around each of them. I am following these two papers:

-Genie, M.G., Ryan, M., & Krucien, N. (2021). To pay or not to pay? Cost information processing in the valuation of publicly funded healthcare. Social Science & Medicine, 276, 113822.
-Gonzalez, J. (2019). A Guide to Measuring and Interpreting Attribute Importance. The Patient - Patient-Centered Outcomes Research, 12, 1-9.

Best wishes,

Pamela.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Bootstrap estimation

Post by stephanehess »

Pamela

these are simple calculations that are similar to marginal rates of substitution. If your coefficients are non-random, then you should be able to calculate the standard errors using the delta method in Apollo, rather than bootstrapping. But are yours random? If so, can you be sure that the measures have finite moments?

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
esadergin
Posts: 7
Joined: 10 Jan 2021, 13:17

Re: Bootstrap estimation

Post by esadergin »

Hi all,
I want to use bootstrap estimation in order to analyze the statistical accuracy for parameter estimates of latent class models. I want to check the confidence intervals for the parameters of the LCMs, based on parametric bootstrap. As a result of the bootstrap estimation of the LCM example, it gives LL of numerous samples. What should have done after this step to get the comparable result?
Many thanks.
Best regards.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Bootstrap estimation

Post by stephanehess »

Hi

apollo_bootstrap returns not just the LL but also the parameter estimates for the different samples, as described in the help file. From these, you can compute confidence intervals. You're possibly only looking at the on screen output

Alternatively, you can also call apollo_estimate with bootstrapSE, see again the help file

Best wishes

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