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.
  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.

Delta method in random parameter models

Ask questions about post-estimation functions (e.g. prediction, conditionals, etc) or other processing of results.
stephanehess
Site Admin
Posts: 558
Joined: 24 Apr 2020, 16:29

Re: Delta method in random parameter models

Post by stephanehess » 13 Jan 2022, 08:47

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
--------------------------------
Stephane Hess
www.stephanehess.me.uk

aellyson
Posts: 5
Joined: 20 Oct 2021, 19:26

Re: Delta method in random parameter models

Post by aellyson » 13 Jan 2022, 16:28

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!

stephanehess
Site Admin
Posts: 558
Joined: 24 Apr 2020, 16:29

Re: Delta method in random parameter models

Post by stephanehess » 14 Jan 2022, 15:42

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
--------------------------------
Stephane Hess
www.stephanehess.me.uk

Post Reply