OL_elasticities

139 views
Skip to first unread message

Ishant Sharma

unread,
Jun 2, 2019, 3:14:35 PM6/2/19
to Biogeme
Dear Prof. Bierlaire,

I have been trying to estimate elasticities for an ordinal logit and followed the pdf document (a guide to calculate indicators with pandasbiogeme) and I have calculated the direct elasticities. 

However, I am not sure if I have coded it right as I took the weight as simple (1/n) where n is the total number of observations. 

Also, I am a bit confused about interpretation. Should we divide by 100 to infer the magnitude in percentages?

I have attached the script for your reference in which I have calculated elasticities for two variables ( both are dummy-categorical variables). 

Also, will there be a change in the formula if the variables are categorical instead of continuous? I didn't' find anything in the document about it. 


thank you 

Ishant 
OL_marginal.ipynb
OL_marginal.py

Michel Bierlaire

unread,
Jun 3, 2019, 2:34:30 PM6/3/19
to reachish...@gmail.com, Michel Bierlaire, Biogeme

On 30 May 2019, at 05:24, Ishant Sharma <reachish...@gmail.com> wrote:

Dear Prof. Bierlaire,

I have been trying to estimate elasticities for an ordinal logit and followed the pdf document (a guide to calculate indicators with pandasbiogeme) and I have calculated the direct elasticities. 

However, I am not sure if I have coded it right as I took the weight as simple (1/n) where n is the total number of observations. 

The weights should be calculated so that the sample used in sample enumeration reflects the actual population. This applies to any sample enumeration. 


Also, I am a bit confused about interpretation. Should we divide by 100 to infer the magnitude in percentages?

Elasticities are unit free. So if you want percentages, you have to multiply by 100. 


I have attached the script for your reference in which I have calculated elasticities for two variables ( both are dummy-categorical variables). 

It does not make sense to calculate point elasticities for discrete variables, as they are based on derivatives. Use arc elasticities. 




Also, will there be a change in the formula if the variables are categorical instead of continuous? I didn't' find anything in the document about it. 

Look at Section 3 of the above-mentioned document.



thank you 

Ishant 

--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To post to this group, send email to bio...@googlegroups.com.
Visit this group at https://groups.google.com/group/biogeme.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/9d980d6b-4bff-408e-b21f-71a095ee8ff5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<OL_marginal.ipynb><OL_marginal.py>

Ishant Sharma

unread,
Jun 5, 2019, 2:51:45 AM6/5/19
to Michel Bierlaire, Biogeme
Thank you for your response, Sir. 

I have about 20 dummy variables in the final model (ordinal logit). Is there any other way to calculate arc elasticities for each variable other than creating after_utility (after) for each variable 20 times? 
--

Best, 


Ishant Sharma

Graduate Research Assistant
PhD scholar | Civil Engineering

(Transportation Engineering)
The University of Memphis
+1 901-607-7576

Michel Bierlaire

unread,
Jun 5, 2019, 2:51:48 AM6/5/19
to Ishant Sharma, Michel Bierlaire, Biogeme

On 5 Jun 2019, at 01:18, Ishant Sharma <reachish...@gmail.com> wrote:

Thank you for your response, Sir. 

I have about 20 dummy variables in the final model (ordinal logit). Is there any other way to calculate arc elasticities for each variable other than creating after_utility (after) for each variable 20 times? 

I don’t think so. But it should be easy to program a loop that takes care of it in Python.
Reply all
Reply to author
Forward
0 new messages