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