Page 1 of 1

Willingness-to-pay considering binary variable

Posted: 03 May 2021, 20:38
by infiniteugi
Hello,

I wonder if it is appropriate to calculate WTP using binary variable and continuous variable. For example, I want to calculate the WTP of the presence of an attendant (yes = 1, no = 0). In this case, can I calculate the ratio of b_attendant and b_cost for the WTP?

Your advice will be helpful for me to improve the research paper.

Thank you very much in advance.

Re: Willingness-to-pay considering binary variable

Posted: 10 May 2021, 17:56
by dpalma
Hi,

Yes, you calculate the WTP for binary variables the same way than for continuous ones. If you are using a linear in parameters utility function and fixed (as in non-random) coefficients, you simply calculate the ratio of b_attendant and b_cost to get the WTP for "attendant".

Cheers
David

Re: Willingness-to-pay considering binary variable

Posted: 10 May 2021, 20:21
by infiniteugi
Thank you, David.

I got two more questions:

1. Since the coefficient of travel cost is negative, the ratio is negative. But the value presented by Apollo is the absolute value of this ratio. Can you please clarify how this negative ratio is to be interpreted and what it means for the willingness-to-pay estimates?

2. Since the b_attendant variable is binary, I am not sure if calculating the value of human assistant by taking the ratio of the parameters is the right way since the utility won't be differentiable from the binary variable.

Thank you very much for your help in advance.

Re: Willingness-to-pay considering binary variable

Posted: 12 May 2021, 17:04
by dpalma
Hi,

Concerning your first question, what do you mean by "the value presented by Apollo"? The way I would calculate the WTP is first estimating a model, and then using the apollo_deltaMethod function to calculate the ratio between two (non-random) coefficients and its s.e. Something like:

Code: Select all

apollo_deltaMethod(model, list(operation='ratio', parName1='b_tt_car', parName2='b_cost'))
The value returned by apollo_deltaMethod is not the absolute value, it can be positive, negative or zero. More in general, if the two coefficients have opposite sign you will get a negative marginal rate of substitution, meaning that to increase the utility you need to change the corresponding attributes in opposite directions, e.g. increase quality and decrease price. On the other hand, if you get a positive marginal rate of substitution, it means that to increase the utility you need to change both corresponding attributes in the same direction (note that this could mean an increase or decrease of the attributes, depending on their sign), e.g. reduce both the fate and travel time of a travel mode.

About your second question, the marginal rate of substitution (e.g. the WTP) is defined as dU/dx1 / dU/dx2. If U is a linear or any other continuous function on x1 and x2, then both dU/dx1 and dU/dx2 will exist. The fact that you only evaluate U at x1=0 or x1=1 does not make U discontinuous with respect to x1. So it is fine to calculate the marginal rate of substitution of a dummy variable.

What wouldn't make sense is to calculate the elasticity of the probability with respect to a dummy variable, as the dummy variable only makes discrete changes. In that case, it would be better to calculate the Average Marginal effect: P(i | x1=1) - P(i | x1=0).

Cheers
David

Re: Willingness-to-pay considering binary variable

Posted: 08 Jun 2021, 18:57
by caldeiraga
Hi David,

I have a question about computing Average Marginal effect for dummy variables, when you write P(i | x1=1) - P(i | x1=0), does it mean that I need to compute the probability for the complete estimated sample, and then subselect in the sample the observations with x1=1 and x1=0 and calculate the difference? Thanks in advance!

Best,
Gabriel

Re: Willingness-to-pay considering binary variable

Posted: 10 Jun 2021, 11:16
by dpalma
Hi Gabriel,

What I mean by P(i | x1=1) is that you take your database, and modify it so that everyone has x1=1, and then forecast the probability of choosing alternative i. Then, you modify the database again so that x1=0 for everyone, and forecast the probability of choosing i again, i.e. P(i | x1=0). Finally, you calculate the AME as the difference between the two.

Cheers
David

Re: Willingness-to-pay considering binary variable

Posted: 07 Jul 2024, 11:43
by Aditya249
Hi David!
Considering that the concept of elasticity applies only to continuous variables, could you please clarify if the following approach is suitable for calculating the average marginal effect of dummy variables such as gender and marital status?

First, we estimate a model.
Next, we set all alternative-specific continuous variables to their mean values.
Then, we set the values of all dummy variables to zero.
Finally, we change the values of each dummy variable (from 0 to 1) one at a time (ceteris paribus) and calculate the resulting change in the probability of choosing alternatives.

Re: Willingness-to-pay considering binary variable

Posted: 08 Jul 2024, 07:14
by stephanehess
Hi

I would not do that. What I would do is to keep all attributes at the distribution from the data, and then make two predictions where you change only the attribute of interest, setting it to 0 in one predicition and 1 in the other (for one alternative, of course)

Stephane

Re: Willingness-to-pay considering binary variable

Posted: 08 Jul 2024, 08:51
by Aditya249
Thank you Prof. Hess for your prompt response.

To clarify, for examining the marginal effects of dummy variables—specifically, gender (female) and mode of transportation (car and bus)—on the decision to work from home and continuous variables, namely travel time and travel cost.

Upon estimating a Multinomial Logit (MNL) model, I found the coefficients as (all statistically significant):

Travel time: -0.6
Travel cost: -0.8
Female: 1.2
Mode use Car: -4.5
Mode use Bus: 2.3

The mean values for these variables are as follows:

Travel time: 23
Travel cost: 40
Female (1,0): 23% of the sampled population is female
Mode use Car (1,0): 60% of the sampled population of car users
Mode use Bus (1,0): 40% of the sampled population bus user
Therefore, the utility equation used to calculate the probability of choosing to work from home is:

U(work from home)=−(0.6×23)−(0.8×40) +(1.2×0.23)−(4.5×0.6)+(2.3×0.4) +1 (asc)

To determine the elasticity of the continuous variables (travel time or cost), I will increase their mean values by 1% and observe the resultant change in the probability of choosing work from home.

For the marginal effect of dummy variables, I will substitute values of 0 and 1 and examine how these changes affect the probability of choosing WFH.

Additionally, please suggest how to estimate the marginal effect for mutually exclusive variables in this case considering that if a person uses a car they cannot use the bus. So should I consider taking the value of the car as 1 and putting the value of bus as 0 and vice versa or I should retain the mean value of the other variable (let's say bus) and just change the values for the car from 0 to 1 and assess the change in probability.

Re: Willingness-to-pay considering binary variable

Posted: 12 Aug 2024, 10:54
by stephanehess
Hi

sorry for the slow reply. To allow me to answer your question, can you tell me about the model setup, maybe by showing me the code?

Thanks