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.

estimating conditional medianWTP with a lognormal-cost estimates

Ask questions about post-estimation functions (e.g. prediction, conditionals, etc) or other processing of results.
Post Reply
valeria toledo
Posts: 10
Joined: 20 Aug 2020, 15:20

estimating conditional medianWTP with a lognormal-cost estimates

Post by valeria toledo »

Hi I am estimating a model with lognormal cost and want to use the preference of space.
1. First I estimated the same model in preference of space and WTP space to compare the estimates. I assumed a lognormal distribution for cot: randcoeff[["log_cost" ]] =-exp(mu_log_cost + sigma_log_cost * draws_log_cost) .
I estimated the mean WTP (Battr/exp(mu_logcost+s/2)) and median MWTP (Battr/exp(mu_logcost)) in pref space. For instance, for the first attribute are 10.32 and 24.69, respectively. I also estimated the wtp space model, and the meanWTP obtained directly in the WTP space model is 27.12.
As you can see working with medians in this case is more informative as my wtp distribution is skewed.

2. Then I estimated the conditional estimates using apollo_conditionals.
I went ahead and applied the same formulas explained before with my conditional parameters for each individual but found that both the mean and the median the estimates were very different. The conditinal wtps have two digits and the unconditional wtps have one digit (i.e. medianMwtp for attr 1 is 24.69 compared to the conditional medianMWTP for attribute 1 is 2.38).
This made me think that maybe “Apollo_conditional()” formula is already making the transformation of the lognormal cost coefficient and the parameter it gives you as the output is already transformed (is mu_cost), so it does not need to be transformed anymore (as it is not mu_logcost).
I made a quick test using wtp= -coditionaBattr/condBcost to estimate the conditional wtps and I get numbers that are much more very similar to my original “unconditional estimates”. (i.e. medianMwtp for attr 1 is 24.69 and the mean of conditionalMWTP for attribute 1 is 29.85.


So to confirm this, my question is, does “Apollo_conditional()” output gives you the mu_cost estimate or the mu_logcost estimate?


3. Assuming that I am right and that I can use the conditional cost estimates directly to calculate WTPs without doing any transformation of the cost parameter (using wtp= -coditionaBattr/condBcost ). How would I go to estimate the obtain the median conditional WTP ?

Is there a way to change the Apollo_conditional() code to give you medians rather than the means of the cost parameters?

Thanks for your clarification and help!

Kind regards
Valeria Toledo
dpalma
Posts: 190
Joined: 24 Apr 2020, 17:54

Re: estimating conditional medianWTP with a lognormal-cost estimates

Post by dpalma »

Hi Valeria,

Concerning your first question: yes, apollo_conditionals returns the mean and standard deviation of the random coefficient itself, including any tranformation you might have done inside apollo_randCoeff. So in your case the mean and standard deviation of the lognormal, not the underlying normal. In your notation, it returns the mean of log_cost, what you seem to call mu_cost.

Concerning your second question: no, apollo_conditionals cannot return the median of the individual posteriors. However, you may be able to calculate the median using the procedure described in another of your posts: viewtopic.php?f=16&t=273&p=890#p890

Cheers
David
valeria toledo
Posts: 10
Joined: 20 Aug 2020, 15:20

Re: estimating conditional medianWTP with a lognormal-cost estimates

Post by valeria toledo »

Dear David ,
Thanks the clarification and suggestion to estimate the means. I will see if I have luck with that.

Kind regards
Valeria Toledo
Post Reply