Page 1 of 2

Positive price coefficient in RPL model estimation

Posted: 04 May 2024, 19:37
by DavidKL
Hi!

I would like to ask why I can estimate a positive parameter for the price coefficient for a random parameter logit specification?
For the basic MNL model I estimate a negative coefficient, all results are correct, but for RPL whatever I do, the coefficient is always positive.
I specify the random coefficient according to the sample example on the page: randcoeff[["b_tc"]] = -exp( mu_log_b_tc + sigma_log_b_tc * draws_tc )

I've tried both halton and mlhs casts, but no change.

Thanks in advance for your help!

David

Re: Positive price coefficient in RPL model estimation

Posted: 05 May 2024, 10:46
by stephanehess
David

you are using

Code: Select all

randcoeff[["b_tc"]] = -exp( mu_log_b_tc + sigma_log_b_tc * draws_tc )
which means that the cost coefficient follows a negative lognormal distribution. A negative lognormal is a negative exponential of a Normal, so the parameters you are estimating are the mean and standard deviations of log(-b_tc). So your cost coefficient is not positive, it's just that the mean of the Normal that's inside the exponential is positive.

This is discussed in many places in the literature. You can then calculate the moments for the lognormal distribution using the appropriate formulae, or you can use the apollo_unconditionals function

Hope this helps

Stephane

Re: Positive price coefficient in RPL model estimation

Posted: 05 May 2024, 19:22
by DavidKL
Hi Stephane!

Thank you very much for your answer, it is now clear and I was able to determine the true average using the unconditional function.

I would like to ask that I can also do the WTP calculations with the unconditional function, e.g. wtp=unconditionals[[["b_attribute"]]/unconditionals[[["b_price"]]

And if so, how can I calculate standard errors alongside the WTPs to perform significance testing? The delta method doesn't work here, if I'm correct?

Thanks again for your help!

David

Re: Positive price coefficient in RPL model estimation

Posted: 06 May 2024, 07:46
by stephanehess
David

to get standard errors, you would likely need to do sampling from the asymptotic parameter distribution. We've not implemented any code for that.

But with lognormals, you can also calculate the moments for the ratio analytically (a ratio of two lognormals is a lognormal) and then you can use the delta method on those expressions to get standard errors for the mean and sd

Stephane

Re: Positive price coefficient in RPL model estimation

Posted: 06 May 2024, 16:14
by DavidKL
Hi Stephane!

Thank you very much!

Unfortunately, I had to apply a normal distribution to all other attributes except for the price.
In that case, perhaps it is easier to estimate the model in WTP space?

David

Re: Positive price coefficient in RPL model estimation

Posted: 07 May 2024, 07:52
by stephanehess
you can do, if you really think a Normal makes sense (it normally does not)

Re: Positive price coefficient in RPL model estimation

Posted: 07 May 2024, 18:37
by DavidKL
Thank you for your reply Stephane!
What do you mean that the normal distribution has no sense? Isn't this only true for attributes such as cost, travel time, etc.?

Re: Positive price coefficient in RPL model estimation

Posted: 08 May 2024, 10:09
by stephanehess
What are your attributes?

Re: Positive price coefficient in RPL model estimation

Posted: 08 May 2024, 18:42
by DavidKL
I work with 4 attributes:
1. price (I defined a negative lognormal distribution)
2. brand (I defined a normal distribution)
3. country of origin (I defined a normal distribution)
4. presence of sustainability label (I defined a normal distribution)

Re: Positive price coefficient in RPL model estimation

Posted: 09 May 2024, 06:26
by stephanehess
Okay, in that case, Normals might be okay. In terms of computing error measures, you can have a look at this paper (DOI: 10.1016/j.trb.2013.09.010) and think about how to set this up in Apollo, but it is not precoded