Dear all.
I have unordered data and have estimated the multinomial logit model.
This is the example of my dataset
I have run the command
And now want to calculate the conditional marginal effects for certain type of weather on the probability of using a certain transp_mode. What would be the appropriate command and perhaps someone could add in the math formula for it?
Thank you very much for your time
Kindest regards
I have unordered data and have estimated the multinomial logit model.
This is the example of my dataset
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(transp_mode age_cat female) float distance_km long weather int year 2 1 1 4.979599 2 2018 4 1 0 18.339369 2 2018 1 2 1 .08924986 3 2018 1 1 1 1.104875 3 2018 4 2 0 81.17729 3 2018 4 1 1 7.263874 3 2018 1 4 1 .51526684 1 2018 4 1 0 8.373368 2 2018 2 2 0 16.95495 1 2018 5 2 0 2.393716 2 2018 4 2 0 6.160923 2 2018 5 1 0 1.087017 3 2018 2 2 0 16.391123 2 2018 2 3 0 7.263874 3 2018 4 4 0 1.380034 2 2018 2 4 0 2.8397374 1 2018 1 1 1 .08924986 1 2018 3 2 0 22.721685 3 2018 4 3 0 .4328967 3 2018 5 1 1 1.0040315 3 2018 3 2 0 14.635754 1 2018 5 4 0 1.295433 1 2018 4 1 1 95.39267 3 2018 4 1 1 95.39267 3 2018 5 1 0 .8791119 2 2018 4 1 0 11.43512 2 2018 4 1 0 12.354066 2 2018 4 2 0 1.295433 3 2018 2 2 0 2.393716 3 2018 2 2 1 7.994223 1 2018 4 1 1 4.661379 2 2018 4 1 0 174.02007 2 2018 4 1 1 9.885872 2 2018 4 1 1 20.233477 2 2018 2 2 0 5.2509 1 2018 1 2 1 .4328967 2 2018 4 1 0 4.420173 2 2018 2 2 1 18.761187 2 2018 2 2 0 23.143587 2 2018 4 3 0 28.426075 2 2018 4 3 0 19.425905 1 2018 5 1 0 2.2534153 2 2018 4 1 1 9.797473 2 2018 4 1 1 17.886116 2 2018 5 1 0 4.3756337 1 2018 2 3 1 86.65344 2 2018 2 3 1 19.038084 2 2018 2 2 0 19.25578 2 2018 3 1 1 6.160923 1 2018 3 3 0 25.56547 1 2018 3 3 1 66.38572 1 2018 5 3 1 1.232677 1 2018 4 2 0 2.096273 1 2018 3 2 0 16.4633 1 2018 2 3 0 17.351875 1 2018 4 1 0 .08924986 1 2014 5 1 0 0 1 2014 5 2 1 0 1 2014 1 4 1 .08924986 1 2014 5 2 1 0 1 2014 5 1 0 1.5548694 1 2014 1 1 1 .08924986 1 2014 . 1 1 .08924986 1 2014 1 2 1 0 1 2014 1 1 0 0 1 2014 5 1 1 .51526684 1 2014 5 1 1 0 1 2014 1 2 1 .51526684 1 2014 4 3 1 .08924986 1 2014 1 3 1 .08924986 1 2014 5 2 0 4.3756337 1 2014 5 2 0 .08924986 1 2014 5 2 0 0 1 2014 5 1 0 .08924986 1 2014 4 1 1 0 1 2014 4 2 1 .08924986 1 2014 1 1 1 .08924986 1 2014 4 1 1 0 1 2014 1 1 0 0 1 2014 3 2 1 .08924986 1 2014 3 1 0 .08924986 1 2014 4 1 1 0 1 2014 1 1 0 .51526684 1 2014 3 2 0 0 1 2014 5 2 0 .08924986 1 2014 1 1 0 1.5548694 3 2014 4 2 0 .08924986 3 2014 5 1 0 .51526684 3 2014 3 1 1 1.5548694 3 2014 1 1 0 .08924986 3 2014 4 1 0 0 3 2014 1 1 0 .08924986 3 2014 5 2 1 0 3 2014 5 2 1 .08924986 3 2014 1 1 0 .08924986 3 2014 1 1 0 0 3 2014 4 2 1 0 3 2014 4 1 1 .08924986 1 2014 1 2 1 .08924986 1 2014 5 2 1 .08924986 1 2014 end label values transp_mode transp_mode_lab label def transp_mode_lab 1 "Bike or moped", modify label def transp_mode_lab 2 "Car", modify label def transp_mode_lab 3 "Car + Public transport", modify label def transp_mode_lab 4 "Public transport", modify label def transp_mode_lab 5 "Walking", modify label values age_cat age_cat label def age_cat 1 "18-30", modify label def age_cat 2 "31-50", modify label def age_cat 3 "51-65", modify label def age_cat 4 "Over 65", modify label values female female label def female 0 "male", modify label def female 1 "female", modify label values weather weather label def weather 1 "Cloudy", modify label def weather 2 "Rainy", modify label def weather 3 "Sunny", modify
Code:
mlogit transp_mode i.age_cat female i.weather distance_km i.year
Thank you very much for your time
Kindest regards
Comment