Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • margins after mlogit beta coefficients

    Dear Stata users,

    I am running a margins command after mlogit. But if I compare the beta-coefficience of mlogit with the dy/dx of margins they don't point in the same directions (different algebraic signs) and have different significances.
    Is my assumption right, that this shouldn't happen because of marginal effect = B*P*(1-P) ? What could be the mistake?

    I'd appreciate your answer
    Last edited by Jakob Hens; 26 Aug 2016, 13:20. Reason: mlogit margins

  • #2
    My guess is you are reading the output wrong, at least with regards to the signs. Post your code and output using code tags and we can better advise you. See pt 12 of the FAQ.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      Thanks for you fast reply. I am using Stata 12.0.

      My code is:
      Code:
        
      mlogit mode age sex(d) income drivinglicence(d) number_of_cars number_of_persons_in_household number_of_children_in_househould number_of_attends fulltime_job(d) type_of_regions(categorial) distance_to_public_transport weekday(d) bad_weather(d) travelling_distance
      
      margins, dydx(*) predict (outcome(1))
      margins, dydx(*) predict (outcome(2))
      margins, dydx(*) predict (outcome(3))
      margins, dydx(*) predict (outcome(4))
      margins, dydx(*) predict (outcome(5))
      I try to figure out how to post the output right, but in hope I will get a fast answer again, I do a quick example:

      For Beta-coefficients I get:

      mainmode=car
      age: -0.0041893***
      sex: 0.1704235***


      For dy/dx I get:

      mainmode=car
      age: .0002081***
      sex: -0.0023454*
      by foot bycicle passenger public transport
      age -.0045607*** -.0120987*** -.0052017*** -.0208605***
      (0.0009860) (0.0011335) (0.0011759) (0.0013806)
      sex .1707172*** 0.0355665 1.15332*** .2712176***
      (0.0284735) (0.0343009) (0.0354202) (0.0420593)
      income class -.0328871* 0.0279678 .0366728* .0987095***
      (0.0128233) (0.0149181) (0.0147840) (0.0199468)
      driving licence -3.484296*** -3.345589*** -3.922132*** -4.039988***
      (0.0835428) (0.0873898) (0.0847697) (0.0894420)
      no of cars -.6100744*** -.9818317*** -.4692407*** -1.424918***
      (0.0215875) (0.0309440) (0.0250940) (0.0416440)
      no of persons .1709576*** .3658832*** .4430399*** .491329***
      (0.0211155) (0.0251116) (0.0209499) (0.0271697)
      children -.5201882*** -.504931*** -.8134254*** -.9184858***
      (0.0241942) (0.0286237) (0.0259779) (0.0342881)
      no of attends .4545237*** (0.0667324) .4400053*** .4549948***
      (0.0396865) (0.0816634) (0.0395347) (0.0398604)
      full time job -.1478929*** -.1736127*** -.2922867*** -.2315594***
      (0.0312954) (0.0392780) (0.0363761) (0.0478041)
      type of region -.1154344*** -(0.0060868) -.0509866* -.4770431***
      (0.0194160) (0.0237432) (0.0219726) (0.0337200)
      access to public transport -.084972*** -.0781496*** -.0566871*** -.1892088***
      (0.0085647) (0.0095406) (0.0092176) (0.0119050)
      weekdays -.3727335*** (0.0531392) -.6750801*** .4591038***
      (0.0352049) (0.0469874) (0.0375523) (0.0573535)
      bad weather -.1198761*** -.6015859*** -.0971056** -0.0485237
      (0.0311568) (0.0447113) (0.0365661) (0.0493045)
      distance -.573803*** -.1460175*** .0038347*** .0043389***
      (0.0132890) (0.0068089) (0.0004524) (0.0005482)
      cons_ 6.122348*** 4.189018*** 2.219924*** 4.483792***
      (0.1257553) (0.1420674) (0.1397060) (0.1600665)
      by foot bycicle car (passenger) car (driver) public transport
      P(i) 0.00692845 0.08735285 0.17095168 0.63183296 0.10293406
      age -0.00000302 -.0006965*** -0.0001841 .0026063*** -.0017227***
      (0.0000061) (0.0000876) (0.0001585) (0.0002061) (0.0001231)
      sex(d) -.0003972* -.016662*** .155728*** -.1428881*** 0.0042193
      (0.0001808) (0.0027371) (0.0046006) (0.0060104) (0.0036493)
      income group -.000357*** 0.0008144 0.0030819 -.0117806*** .0082414***
      (0.0000892) (0.0011329) (0.0019990) (0.0026821) (0.0017720)
      driving licence -.0075053*** -.0745293*** -.3447063*** .666953*** -.2402121***
      Führerscheinbesitz (d) (0.0009541) (0.0067256) (0.0114714) (0.0054394) (0.0111289)
      no of cars -.0020314*** -.0580852*** -.0260458*** .200217*** -.1140546***
      (0.0002741) (0.0035631) (0.0035378) (0.0049680) (0.0037048)
      no of persons 0.0000797 .0180318*** .0484788*** -.100751*** .0341608***
      (0.0001309) (0.0018803) (0.0026196) (0.0040142) (0.0022064)
      children -.001655*** -.0195338*** -.0909658*** .1777417*** -.065587***
      (0.0002311) (0.0024186) (0.0037058) (0.0051345) (0.0030788)
      no of attends .0022413*** -(0.0056168) .0528194*** -.0827907*** .0333468***
      (0.0003110) (0.0064651) (0.0053838) (0.0084979) (0.0032507)
      fulltime -.0004093* -.0073668* -.034037*** .0562981*** -.0144849***
      (0.0002044) (0.0029962) (0.0047980) (0.0061923) (0.0041638)
      type of region -.00039** .0046354* (0.0013958) .037374*** -.0430153***
      (0.0001300) (0.0018429) (0.0029928) (0.0040985) (0.0029492)
      distance to public transport -.0003353*** -.003631*** -.003437** .0231138*** -.0157105***
      (0.0000673) (0.0007526) (0.0012459) (0.0016875) (0.0010833)
      weekdays -.002073*** .0121613*** -.1161797*** .0566273*** .0494641***
      (0.0003383) (0.0035499) (0.0059066) (0.0074578) (0.0039438)
      bad weather -0.0003534 -.0404494*** -0.004924 .0437152*** 0.0020116
      (0.0001958) (0.0031480) (0.0049344) (0.0066374) (0.0044637)
      travel distance -.0038673*** -.0113899*** .0033273*** .0098746*** .0020553***
      (0.0003533) (0.0004367) (0.0001251) (0.0003872) (0.0000850)
      Last edited by Jakob Hens; 26 Aug 2016, 14:30.

      Comment


      • #4
        Your expectations are incorrect, the output is fine (at least from this perspective).

        Multivariate logit regressions are very complicated. Regardless of the particular values of the predictor variables you specify, the sum of the predicted probabilities for all the outcome levels must equal 1. In addition, the effects are non-linear: how much the outcome probability change for a given change in a predictor actually depends on the levels of the predictors at baseline. (The marginal effects you are getting here are averaged over the combinations of values of predictors observed in your sample.) So it can happen that the positive coefficient of a predictor for some of the levels of the outcome produce so much increase in those outcome probabilities, that in order for the sum of all outcome level probabilities not to go over 1, there has to be a decrease in the outcome probabilities of other levels of the outcome variables even though they, too, have positive coefficients for that predictor. So there is no general rule that the sign of the marginal effect is the same as the sign of the coefficient.

        Added: By the way, if your paste the Stata output between code delimiters, just as you did with your commands, the result will be more readable.
        Last edited by Clyde Schechter; 26 Aug 2016, 15:04.

        Comment


        • #5
          This would be a lot easier to read if you also used code tags for the output. The spost13 commands, especially mtable, may be helpful to you (findit spost13). For examples, see

          http://www3.nd.edu/~rwilliam/xsoc73994/Margins05.pdf
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment


          • #6
            Thank you both very much, this was really helpful!
            I will try to make the outputs look better soon.

            Comment

            Working...
            X