Page 2 of 3

Re: WTP for mixed logit with random parameters

Posted: 18 Jun 2023, 10:14
by stephanehess
Hi Julia

regarding normal distributions, while they are the default in many applications, this should not be the case. There are very few cases where a normal distribution really makes behavioural senses as it implies a symmetrical and unbounded distribution of sensitivities.

The confusion you have below arises from the difference between population level heterogeneity (which is what the sd of the randomly distributed parameters relates to) and parameter uncertainty (which is what the standard errors relate to). Those are two different things.

What is is that you're after exactly? Moments of WTP with associated standard errors, or a distribute of the WTP with an associated confidence interval around the distribution itself?

Stephane

Re: WTP for mixed logit with random parameters

Posted: 02 Jul 2023, 13:55
by JuliavB
Hi Stephane,

thank you for your reply.
1. So, in order to choose the right type of distribution should I try for different distributions in the code and take a look at the outputs or can also the visualization of conditionals with a code like this be helpful to get an indication which distribution is the right one?

ggplot(conditionals$b_HoeheEEE, aes(x = post.mean)) +
geom_histogram(aes(y = ..count.. / (sum(..count..) * 0.3)), binwidth = 0.01, fill="#69b3a2", color="#e9ecef", alpha=0.9) +
scale_y_continuous(labels = scales::percent) +
geom_density(fill="#69b3a2", color="#e9ecef", alpha=0.6) +
labs(title ="Histogramm and kernel density estimate", x = "Utility", y = "Relative frequency [%]")

2. Just in case that I assume A2 and A3 being normally distributed I can use the below code to calculate the WTP and its. s.e., can`t I? And this is what you refer to as the moments of WTP with associated standard errors (to report parameter uncertainty)?

deltaMethod_settings=list(expression=c(WTP_A2="(mu_A2/b_price)", WTP_A3="(mu_A3/b_price)"))
apollo_deltaMethod(model, deltaMethod_settings)

And when I do not assume normal distribution I can only get the expected value of the WTP via below code? And this is what you refer to as WTP with an associated confidence interval around the distribution itself (to illustrate population level heterogeneity)?

> ### Simulating expected value of WTP for A2
> un <- apollo_unconditionals(model, apollo_probabilities, apollo_inputs)
Unconditional distributions computed
> mean(un$b_HoeheEEE/model$estimate["b_Beitr"])
[1] 0.4087403
> sd(un$b_HoeheEEE/model$estimate["b_Beitr"])
[1] 0.3404505

Would be of great help if you could confirm my above conclusions.

Thanks,
J.

Re: WTP for mixed logit with random parameters

Posted: 05 Jul 2023, 16:42
by stephanehess
Hi

I wouldn't use conditionals for this purpose. They do not show you the true distribution in any way as it still all depends on the sample level distribution you have used. I suggest you pick a distribution that is in line with your behavioural assumptions

If your cost coefficient is fixed, then you can indeed use the calculations you propose below, but can you really expect that to be the case. I would suggest you try a model with a negative lognormal for cost, for example

The delta method calculation indeed relates to parameter uncertainty, while the calculations with the unconditionals relates to heterogeneity

Stephane

Re: WTP for mixed logit with random parameters

Posted: 05 Jul 2023, 18:01
by JuliavB
Hi Stephane,

thank you for your quick reply.
So if I assume A2 and A3 being normally distributed I can use the below code to calculate the WTP and its. s.e.:

deltaMethod_settings=list(expression=c(WTP_A2="(mu_A2/b_price)", WTP_A3="(mu_A3/b_price)"))
apollo_deltaMethod(model, deltaMethod_settings)

And if I do not assume normal distribution for A2 I can only get the expected value of the WTP via this code:

> ### Simulating expected value of WTP for A2
> un <- apollo_unconditionals(model, apollo_probabilities, apollo_inputs)
Unconditional distributions computed
> mean(un$b_HoeheEEE/model$estimate["b_Beitr"])
[1] 0.4087403
> sd(un$b_HoeheEEE/model$estimate["b_Beitr"])
[1] 0.3404505

Thanks and best,
Julia

Re: WTP for mixed logit with random parameters

Posted: 05 Jul 2023, 18:08
by stephanehess
Julia

the delta method one gives you the mean of the WTP, and its se. The other calculation gives you the mean and the sd of WTP in the population

Stephane

Re: WTP for mixed logit with random parameters

Posted: 05 Jul 2023, 18:21
by JuliavB
Yes, the calculations give different information.
So it does not matter what distribution is assumed for A2 and A3 - as long as the price parameter is fixed I can use both calculations as they give different insights into my data?

Re: WTP for mixed logit with random parameters

Posted: 05 Jul 2023, 20:47
by stephanehess
Well, the whole point of having random heterogeneity would be that you want to know about the distribution of wtp too, so from that perspective, youl want to know not just about the mean. but of course, standard errors are important too as they tell you about the precision of your estimates. But you should then do that not just for the mean

Re: WTP for mixed logit with random parameters

Posted: 24 Jul 2023, 13:03
by JuliavB
Thank you very much for your response.

So, if I have fixed price parameter and normally distributed A2 and A3:
1. the delta method calculation below gives me the mean of the WTP and its se (relating to parameter uncertainty):
deltaMethod_settings=list(expression=c(WTP_A2="(mu_A2/b_price)", WTP_A3="(mu_A3/b_price)"))
apollo_deltaMethod(model, deltaMethod_settings)

2. The other calculation below gives me the mean and the sd of WTP in the population (relating to heterogeneity) and thereby simulating the expected value of WTP for A2:
> ### Simulating expected value of WTP for A2
> un <- apollo_unconditionals(model, apollo_probabilities, apollo_inputs)
Unconditional distributions computed
> mean_II(un$b_A2/model$estimate["b_price"])
[1] 0.4087403
> sd(un$b_A2/model$estimate["b_price"])
[1] 0.3404505

Are the above definitions correctly assigned to the two calculations?

And how can the precision of estimates be calculated for the second calculation? Somehow like this: I did not find any example on this in the manual:
deltaMethod_settings=list(expression=c(WTP_A2="(mean_II/b_price)")
apollo_deltaMethod(model, deltaMethod_settings)

Thanks for your support.
Best,
J.

Re: WTP for mixed logit with random parameters

Posted: 24 Jul 2023, 17:10
by stephanehess
Hi

if your cost coefficient is fixed, then there is no need for approach 2 as it should give you the same results as approach 1. And then you can also use approach 1 on the standard deviation estimate, so sig_A2/b_price

Stephane

Re: WTP for mixed logit with random parameters

Posted: 27 Jul 2023, 17:43
by JuliavB
I am not sure if there is a misunderstanding on my side:
1. So, if my price coefficient b_price is fixed and A2 coefficient is normally or lognormally distributed random I would only use approach 1 to calaculte the WTP for A2?

And to get the parameter uncertainty of the standard deviation I will use below code:
deltaMethod_settings=list(expression=c(WTP_sd_A2="(sig_A2/b_price)")
apollo_deltaMethod(model, deltaMethod_settings)

But how can the result of this calculation be interpreted, as it is not the WTP for A2? Is it just the uncertainty of the standard deviation of the WTP?

2. And if the price parameter and the A2 parameter both are random lognormally distributed, I need to use the following calculation as there is no b_price but only mu_price anymore due to the randomness of the price parameter?

> ### Simulating expected value of WTP for A2
> un <- apollo_unconditionals(model, apollo_probabilities, apollo_inputs)
Unconditional distributions computed
> mean_II(un$b_A2/model$estimate["mu_price"])
> sd(un$b_A2/model$estimate["mu_price"])