Announcement

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

  • Predict most likely outcome using mlogit

    Hello,
    I'm trying to predict the most likely outcome using an logit model depending on a set of binomial variables.

    The mlogit model is:

    mlogit choix2 vegetation_high irrig zone_nat zone_urb past_ag, b(4) rrr

    Where choix2 takes value 1, 2 3 or 4.

    The results are:

    Iteration 0: log pseudolikelihood = -5397.4332
    Iteration 1: log pseudolikelihood = -5304.7697
    Iteration 2: log pseudolikelihood = -5304.4855
    Iteration 3: log pseudolikelihood = -5304.4855

    Multinomial logistic regression Number of obs = 4,008
    Wald chi2(15) = 107.91
    Prob > chi2 = 0.0000
    Log pseudolikelihood = -5304.4855 Pseudo R2 = 0.0172

    (Std. Err. adjusted for 334 clusters in id1)
    ---------------------------------------------------------------------------------
    | Robust
    choix2 | RRR Std. Err. z P>|z| [95% Conf. Interval]
    ----------------+----------------------------------------------------------------
    1 |
    vegetation_high | .7389016 .0804811 -2.78 0.005 .5968618 .9147438
    irrig | 1.376595 .1505122 2.92 0.003 1.111063 1.705586
    zone_nat | 1.06628 .1265931 0.54 0.589 .8449154 1.345642
    zone_urb | 1.386156 .1758677 2.57 0.010 1.080977 1.777492
    past_ag | 1.200294 .1165183 1.88 0.060 .9923328 1.451837
    _cons | .8356073 .1297989 -1.16 0.248 .6162842 1.132983
    ----------------+----------------------------------------------------------------
    2 |
    vegetation_high | .6956982 .0664302 -3.80 0.000 .5769552 .8388796
    irrig | 2.21371 .2282089 7.71 0.000 1.80872 2.709382
    zone_nat | 1.145 .1144466 1.35 0.176 .9412932 1.392791
    zone_urb | 1.418373 .1581533 3.13 0.002 1.139931 1.764827
    past_ag | 1.152378 .1016185 1.61 0.108 .9694706 1.369794
    _cons | 1.181396 .1665893 1.18 0.237 .8961224 1.557485
    ----------------+----------------------------------------------------------------

    3 |
    vegetation_high | .788454 .0778471 -2.41 0.016 .6497316 .9567946
    irrig | .8747794 .0818569 -1.43 0.153 .7281954 1.05087
    zone_nat | 1.054481 .1019148 0.55 0.583 .8725108 1.274403
    zone_urb | 1.036925 .1151115 0.33 0.744 .834168 1.288966
    past_ag | 1.054526 .0930386 0.60 0.547 .8870692 1.253594
    _cons | 1.963311 .2560553 5.17 0.000 1.520461 2.535146
    ----------------+----------------------------------------------------------------
    4 | (base outcome)
    ---------------------------------------------------------------------------------


    In order to predict the most likely outcome can I estimate the "combined RRR" for each outcome based on the coefficients.

    For example, in order to estimate a "combined RRR" for outcome 3 when all explanatory variables take value 1.
    I can estimate a combined RRR=the product of all coefficients for outcome 3: 0.78*0.87*1.05*...*1.96
    If I do this for each outcome, can I say that if all values of combined RRR are below 1, the most probable outcome is the base outcome (4) and otherwise the one with the highest combined RRR.

    Is this wrong or should I used predicted probabilities for each outcome and each explanatory variables and make the same calculations.

  • #2
    I don't understand the latter part of your text but I think getting what you want is easier; first, see
    Code:
    help mlogit postestimation##predict
    to see how to get predicted probabilities for each outcome category; then use -egen- with the "rowmax" to find the highest probability for each unit; see
    Code:
    h egen

    Comment


    • #3
      You could do what you proposed. But it's a lot of unnecessary work for your purpose. You can get the predicted probabilities for each outcome level conditional on the specified values of the predictive variables from the -margins- command and compare those. Let your computer do the work for you! Along these lines:
      Code:
      sysuse auto, clear
      
      mlogit rep78 price mpg headroom, rrr
      
      margins, at(price = 4000 mpg = 20 headroom = 3)
      The margins output gives you the predicted probability for each outcome at those values of price, mpg, and headroom.

      Added: Crossed with #2.

      Comment


      • #4
        Thanks a lot to both of you. This is very helpful

        Comment

        Working...
        X