Announcement

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

  • Ordered Logit and Margins

    Dear Statalist,

    I want to know whether the next interpretation of the results below is correct and accurate.

    I have a dataset where I have variables like preschool (attended 1 or not 0), and schcomplete with values 0, 1, 2 ,3 corresponding to "No school completed", "completed primary", "completed lower secondary" and "completed upper secondary", respectively.

    I run (please note that I have erased from the output window information about standard error specification, control variables used, etc) :


    Code:
    ologit schcomplete preschool
    
    
    Ordered logistic regression                       Number of obs   =        947
                                                      Wald chi2(17)   =     177.81
                                                      Prob > chi2     =     0.0000
    Log pseudolikelihood = -996.31708                 Pseudo R2       =     0.1174
    
                                    (Std. Err. adjusted for 218 clusters in commid)
    -------------------------------------------------------------------------------
                  |               Robust
      schcomplete |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
        preschool |   .2894881   .1595113     1.81   0.070    -.0231483    .6021244
                  |
    --------------+----------------------------------------------------------------
            /cut1 |  -8.771776   4.005921                     -16.62324    -.920315
            /cut2 |  -6.963359   4.001318                      -14.8058    .8790807
            /cut3 |  -5.492928   3.988863                     -13.31095    2.325099
    -------------------------------------------------------------------------------
    
    .         margins, predict(outcome(1)) at(preschool=1) atmeans post
    
    Adjusted predictions                              Number of obs   =        947
    Model VCE    : Robust
    
    Expression   : Pr(schcomplete==1), predict(outcome(1))
    at           : preschool       =           1
            
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           _cons |   .1482219   .0181786     8.15   0.000     .1125925    .1838513
    ------------------------------------------------------------------------------
    Then, is it correct to say:

    "Children that have attended preschool (Preschool=1), have a 14.82% more likely to complete primary education (schcomplete=1) than those who did not attend preschool (holding the rest of variables constant at their means)."

    If yes, extending the command to:

    Code:
    margins, predict(outcome(1)) at(preschool=1) atmeans post
    margins, predict(outcome(2)) at(preschool=1) atmeans post
    margins, predict(outcome(3)) at(preschool=1) atmeans post
    should give me the probabilities of completing further education based on preschool attendance?

    With respect to the margins command. I know of the existence of a user-written program (findit spost13_ado) that allows the user to use the mtable command, but I find margins more suitable for my purpose.

    Thanks in advance.
    Last edited by Francisco Carballo; 19 Jun 2017, 09:31.

  • #2
    If you are using Stata 14+, there is no need to go through that painful margins one outcome at a time routine. Also I am not sure why you would prefer margins to the mtable command in spost13 -- it is a shell for margins and produces nicer output, especially if you are condemned to using Stata 13.

    You may wish to look at

    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


    • #3
      Also, your multiple margins commands won't work as is, because the post option will replace the estimation results. Why do you want to post the results anyway? If you do want to post, you should save the margins results and keep on restoring the estimation results.

      But again, unless you only have Stata 13, you are making this too hard. And mtable in spost13 would probably be better anyway regardless of your Stata version.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 19.5 MP (2 processor)

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

      Comment


      • #4
        Dear Richard,

        Thanks for your answer. I am sorry for not specifying my Stata version, which as you correctly guessed is 13.

        With mtable I get the following output:

        Code:
        mtable, at(preschool = (0 1))
        
        Expression: Pr(schcomplete), predict(outcome())
        
                   | preschool         0         1         2         3
         ----------+--------------------------------------------------
                 1 |         0     0.076     0.198     0.276     0.450
                 2 |         1     0.060     0.170     0.263     0.508
        If I read and understood it correctly, that means that 17% of preschoolers complete primary education (schcomplete=1) while almost 20% of non-preschoolers do it. But this is not the same information that I am looking for with margins (in the case where I use and understand them correctly).

        Hope someone can shed some light in here.

        Comment


        • #5
          Your #3 message was posted while I was writting #4.

          I am aware of the problems when writing margins command consecutively. I wrote it like that in order to then ask the question about the rest of the values of the categorical variable in question.

          Comment


          • #6
            You are using atmeans in your margins command. But with mtable, "If atmeans is not specified, marginal effects are averaged across observations." So specify atmeans with mtable, or else drop atmeans from your margins command.

            Also possibly confusing things is that outcome 1 corresponds to value 0 on your DV. You have to keep that straight or else consider recoding your dv to start with 1 instead of 0.
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

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

            Comment


            • #7
              "Children that have attended preschool (Preschool=1), have a 14.82% more likely to complete primary education (schcomplete=1) than those who did not attend preschool (holding the rest of variables constant at their means)."

              No, that is wrong. You should either get the predictions for both 0 and 1 on preschool (and compare then) or else get the marginal effect of preschool rather than an adjusted prediction. The mtable command shows you the differences are much smaller than that.

              If it was me and I didn't want to use mtable for some reason, I would do something like

              ologit schcomplete i.preschool
              margins preschool, predict(outcome(0))
              margins r.preschool, predict(outcome(0))
              Last edited by Richard Williams; 19 Jun 2017, 10:35.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              StataNow Version: 19.5 MP (2 processor)

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

              Comment


              • #8
                Thank you so much for your answers, Richard. Everything makes sense now and I understand the relationship between margins and mtable.

                Edit:
                if it helps for other users reading this post, the equivalent to Richard's last code for Stata 13
                Originally posted by Richard Williams View Post

                If it was me and I didn't want to use mtable for some reason, I would do something like

                ologit schcomplete i.preschool
                margins preschool, predict(outcome(0))
                margins r.preschool, predict(outcome(0))
                but using mtable would be:

                Code:
                ologit schcomplete i.preschool
                mtable, dydx(preschool)
                Last edited by Francisco Carballo; 19 Jun 2017, 11:11.

                Comment


                • #9
                  As a sidelight, the link I gave earlier,

                  http://www3.nd.edu/~rwilliam/xsoc73994/Margins05.pdf

                  shows how the mchange command of spost13 can be very useful. However, in Stata 15, mchange currently generates an error after ologit because the ereturned results from ologit have been reformatted. Hopefully mchange will be changed to deal with this. But in the meantime you can use version control with ologit, e.g. something like

                  version 14.2: ologit health i.female
                  mchange
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  StataNow Version: 19.5 MP (2 processor)

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

                  Comment

                  Working...
                  X