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.

HB model specification

Ask questions about model specifications. Ideally include a mathematical explanation of your proposed model.
Post Reply
siqifeng
Posts: 3
Joined: 13 Jun 2024, 04:12

HB model specification

Post by siqifeng »

Hi!

I have a question about the hierarchical Bayes (HB) model specification. On the webpage of example files and data, Hybrid_with_OL_and_MMNL_bayesian seems to be the counterpart of Hybrid_with_OL_and_MMNL, but the former specifies a single random beta:

Code: Select all

b_brand_Artemis = b_brand_Artemis_base + gamma_...
whereas the latter specifies a “mu + sigma*xi” structure:

Code: Select all

randcoeff[["b_brand_Artemis"]] = mu_brand_Artemis + sig_brand_Artemis*xi_Artemis + gamma_...
I wonder if we can use this structure (non-random mu and sigma, and a random xi) when we specify the HB model. I think one advantage is that we can easily constrain the parameter scale using fixedA and fixedD, and it might be easier to interpret the estimation results (like a frequentist MMNL model).

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

Re: HB model specification

Post by stephanehess »

Hi

I invite you to have a detailed look at the manual. The section apollo_randCoeff is only used with classical estimation. With Bayesian estimation, the syntax is different, as explained in the manual. apollo_randCoeff is need as classical estimation relies on monte carlo simulation

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
siqifeng
Posts: 3
Joined: 13 Jun 2024, 04:12

Re: HB model specification

Post by siqifeng »

Thank you for the response, Stephane! I did read the manual carefully, but I'm not familiar enough with Bayesian estimation.

Siqi
Last edited by siqifeng on 13 Jun 2024, 21:54, edited 1 time in total.
stephanehess
Site Admin
Posts: 1355
Joined: 24 Apr 2020, 16:29

Re: HB model specification

Post by stephanehess »

Siqi

maybe I don't completely understand your question then.

In the HB model you are referring to, we have three random parameters, namely b_brand_Artemis_base, b_brand_Novum_base and eta. These are specified as following Normal distributions (see hbDist).

The classically estimated model also allows for three random components, namely the random disturbance in the latent variable (see eta in the code below)

Code: Select all

randcoeff[["LV"]]              = gamma_LV_reg_user*regular_user + gamma_LV_university*university_educated + gamma_LV_age_50*over_50 + eta


and the randomness added to the two branded options, see sig in the following

Code: Select all

randcoeff[["b_brand_Artemis"]] = mu_brand_Artemis + sig_brand_Artemis*xi_Artemis + gamma_Artemis_reg_user*regular_user + gamma_Artemis_university*university_educated + gamma_Artemis_age_50*over_50  
  randcoeff[["b_brand_Novum"]]   = mu_brand_Novum   + sig_brand_Novum  *xi_Novum   + gamma_Novum_reg_user  *regular_user + gamma_Novum_university  *university_educated + gamma_Novum_age_50  *over_50  
If this is not clear, please feel free to clarify your question more and I'll try to help

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
siqifeng
Posts: 3
Joined: 13 Jun 2024, 04:12

Re: HB model specification

Post by siqifeng »

Thank you very much for the clarification! I'm sorry that I haven't checked the forum in a while (until IATBR 2024). I see that the HB and classical estimation are specified differently in Apollo, although both assume normally distributed random parameters.
stephanehess
Site Admin
Posts: 1355
Joined: 24 Apr 2020, 16:29

Re: HB model specification

Post by stephanehess »

Hi

yes, the syntax is different. But both can use distributions other than Normal, of course. This is discussed in more detail in the manual

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