Hi
could you please tell us what the cost attribute is and how that is treated in your model as that affects the WTP calculations. I can't see it in your code
Regarding a polynomial specification, so what you are estimating is beta1 * x + beta2 * x ^ 2? Specifying arndom heterogeneity in that context is possible as you did (making both beta1 and beta2 random) but then you're making an assumption of independence in the random heterogeneity between the two unless you specify a multivariate distribution. Are you actually expexting increasing marginal sensitivities with higher values of x? If not, then you could just use a Box-Cox transform instead of the polynomial
Stephane
Important: Read this before posting to this forum
- 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.
- 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
- Before asking a question on the forum, users are kindly requested to follow these steps:
- Check that the same issue has not already been addressed in the forum - there is a search tool.
- 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
- Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
- Make sure that R is using the latest official release of Apollo.
- Users can check which version they are running by entering packageVersion("apollo").
- Then check what is the latest full release (not development version) at http://www.ApolloChoiceModelling.com/code.html.
- To update to the latest official version, just enter install.packages("apollo"). To update to a development version, download the appropriate binary file from http://www.ApolloChoiceModelling.com/code.html, and install the package from file
- If the above steps do not resolve the issue, then users should follow these steps when posting a question:
- provide full details on the issue, including the entire code and output, including any error messages
- 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.
Delta method in random parameter models
-
- Site Admin
- Posts: 1046
- Joined: 24 Apr 2020, 16:29
Re: Delta method in random parameter models
Stephane,
The cost attribute is an opportunity cost, time. It was the time in minutes required for each option. Our discrete choice setting does not have a standard monetary cost or price. Sorry if this was not clear in my original post.
I see your important point about assuming independence in the random heterogeneity between the linear and quadratic terms. Our dummy-coded regressions (where each attribute was included categorically) did show increasing marginal sensitivities with higher values of x. The difference in the relative preference weights between L1 and L2 of the time attribute was 0.89 (a 0.59 change in preference weight over this range of levels), and the difference in the relative preference weights between L2 and L3 is 0.18 (a 0.09 change in preference weight over this range of levels).
Thanks for any thoughts and/or suggestions you have!
The cost attribute is an opportunity cost, time. It was the time in minutes required for each option. Our discrete choice setting does not have a standard monetary cost or price. Sorry if this was not clear in my original post.
I see your important point about assuming independence in the random heterogeneity between the linear and quadratic terms. Our dummy-coded regressions (where each attribute was included categorically) did show increasing marginal sensitivities with higher values of x. The difference in the relative preference weights between L1 and L2 of the time attribute was 0.89 (a 0.59 change in preference weight over this range of levels), and the difference in the relative preference weights between L2 and L3 is 0.18 (a 0.09 change in preference weight over this range of levels).
Thanks for any thoughts and/or suggestions you have!
-
- Site Admin
- Posts: 1046
- Joined: 24 Apr 2020, 16:29
Re: Delta method in random parameter models
Ah, okay.
So let's look at it independent of what the attributes are.
Let's say we have attributes x_k and x_l.
If your utility is linear in attributes, then in preference space, you'd have V=beta_k * x_k + beta_l * x_l. The marginal rate of substitution (MRS) is given as the ratio of partial derivatives of the utility, so (dV/dx_k)/(dV/dx_l), where we have that dV/dx_k=beta_k and dV/dx_l=beta_l, so MRS=beta_k/beta_l
If we work in MRS space (WTP space if the attribute is cost) in relation x_l, then we would write V=beta_l*(beta_k * x_k + x_l). You can see that the two partial derivatives are now dV/dx_k=beta_k*beta_l and dV/dx_l=beta_l, so that the MRS is given by (beta_k*beta_l)/(beta_l), i.e. MRS=beta_k, the directly estimated parameter for MRS.
When your marginal utilities are no longer linear, then the MRS calculation becomes situation dependent. So if you have:
V=beta_k1 * x_k + beta_k2 * x_k^2 + beta_l1 * x_l + beta_l2 * x_l ^ 2
then the MRS becomes (beta_k1 + beta_k2 * xk ) / (beta_l1 + beta_l2 * xl )
and your MRS thus depends on what the levels for the attributes are. You can then not just easily rewrite the utility in MRS space as the marginal utility now depends on the attribute levels. But you can of course just work in preference space as long as you can ensure that (beta_l1 + beta_l2 * xl ) is stricly one-signed
Stephane
So let's look at it independent of what the attributes are.
Let's say we have attributes x_k and x_l.
If your utility is linear in attributes, then in preference space, you'd have V=beta_k * x_k + beta_l * x_l. The marginal rate of substitution (MRS) is given as the ratio of partial derivatives of the utility, so (dV/dx_k)/(dV/dx_l), where we have that dV/dx_k=beta_k and dV/dx_l=beta_l, so MRS=beta_k/beta_l
If we work in MRS space (WTP space if the attribute is cost) in relation x_l, then we would write V=beta_l*(beta_k * x_k + x_l). You can see that the two partial derivatives are now dV/dx_k=beta_k*beta_l and dV/dx_l=beta_l, so that the MRS is given by (beta_k*beta_l)/(beta_l), i.e. MRS=beta_k, the directly estimated parameter for MRS.
When your marginal utilities are no longer linear, then the MRS calculation becomes situation dependent. So if you have:
V=beta_k1 * x_k + beta_k2 * x_k^2 + beta_l1 * x_l + beta_l2 * x_l ^ 2
then the MRS becomes (beta_k1 + beta_k2 * xk ) / (beta_l1 + beta_l2 * xl )
and your MRS thus depends on what the levels for the attributes are. You can then not just easily rewrite the utility in MRS space as the marginal utility now depends on the attribute levels. But you can of course just work in preference space as long as you can ensure that (beta_l1 + beta_l2 * xl ) is stricly one-signed
Stephane
Re: Delta method in random parameter models
Hi Stephane,
I just want to clarify that I understand correctly from your explanation that it is not possible to estimate a mixed logit model in WTP space if one attribute is specified quadratic?
I’ve run a mixed logit model in preference space with one attribute specified as quadratic and it worked very well. A likelihood ratio test also indicated that a quadratic specification for this one attribute is a better fit for my model than a continuous linear specification. However, I’ve been having issues when I try to run it in WTP space. I came across this forum entry when I searched for an explanation.
Thank you and kind regards,
Simone
I just want to clarify that I understand correctly from your explanation that it is not possible to estimate a mixed logit model in WTP space if one attribute is specified quadratic?
I’ve run a mixed logit model in preference space with one attribute specified as quadratic and it worked very well. A likelihood ratio test also indicated that a quadratic specification for this one attribute is a better fit for my model than a continuous linear specification. However, I’ve been having issues when I try to run it in WTP space. I came across this forum entry when I searched for an explanation.
Thank you and kind regards,
Simone
-
- Site Admin
- Posts: 1046
- Joined: 24 Apr 2020, 16:29
Re: Delta method in random parameter models
Simone
depends. Are you trying to apply the non-linear treatment to cost? Or to some other variable?
Stephane
depends. Are you trying to apply the non-linear treatment to cost? Or to some other variable?
Stephane