Announcement

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

  • clogit - different marginal effects

    Dear Statalist,

    I have results from clogit estimations and want to compute average marginal effects of both dummy and continuous variables (by one sd around the mean/median). However, I am not sure about the mechanics of the different commands.

    1) When I type

    margins, dydx(D_DUMMY) predict(pu0)

    it yields a different results than

    margins, at(D_DUMMY=(0 1)) predict(pu0)

    can someone please clarify the differences to me? In a normal logit environment they seem to yield the same results.


    2) In my case
    margins, at(D_DUMMY=(0 1)) predict(pu0)gives levels that are way too high (80% vs 90%) given that the outcome is rather rare within a group. Does this have to do with the fixed effect that is somehow not taken care of in the level's I'm seeing?

    I'd be very happy for advise on these two issues!
    Best,
    Fred


  • #2
    It might help very much to see your actual output. Enter it using code tags. In the first case you are asking for a marginal effect and in the 2nd case you are asking for adjusted predictions so I wonder if you are interpreting the output correctly.

    Also, Steve Samuels' comments in this thread may be helpful with your 2nd Q:

    http://www.statalist.org/forums/foru...-after-xtlogit
    -------------------------------------------
    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
      Dear Richard,
      thanks for getting back. I cannot post the correct output here because of confidentiality issues but it looks something like this:

      Code:
      clogit D_Y D_DUMMY somecontrols, group(GROUP) cluster(GROUP)
      
      . margins, dydx(D_DUMMY) predict(pu0)
      
      Average marginal effects                          Number of obs   =      30000
      Model VCE    : Robust
      
      Expression   : Pr(D_Y|fixed effect is 0), predict(pu0)
      dy/dx w.r.t. : D_DUMMY
      
      ------------------------------------------------------------------------------
                   |            Delta-method
                   |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
         D_DUMMY|   .15   
      ------------------------------------------------------------------------------
      
       
      . margins, at(D_DUMMY=(0 1)) predict(pu0)
      
      Predictive margins                                Number of obs   =      30000
      Model VCE    : Robust
      
      Expression   : Pr(D_DUMMY|fixed effect is 0), predict(pu0)
      
      1._at        : D_DUMMY=           0
      
      2._at        : D_DUMMY=           1
      
      ------------------------------------------------------------------------------
                   |            Delta-method
                   |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
               _at |
                1  |   .82
                2  |   .90
      ------------------------------------------------------------------------------
      there are around 1500 different groups with one observation per group having D_Y==1 and the rest D_Y==0.

      thanks for pointing out that I seem to confuse two concepts. I want to evaluate the change in percentage points on D_Y when I switch D_DUMMY from 0 to 1, as well as increasing the controls some amount. What is the correct procedure for doing this?

      Now I also checked and saw that the difference from margins, dydx(D_DUMMY) and margins, at(D_DUMMY=(0 1)) is very similar but not exactly the same in the standard logit case. Where does this difference come from? I seem to not have correctly understood all this. Sorry if these are stupid questions.

      Thank you so much!





      Comment


      • #4
        I don't know how much it affects your results, but I would use factor variable notation for your dummy/categorical variables. Otherwise margins will think they are continuous and do a different calculation for them See -help fvvarlist-. So in your example,

        clogit D_Y i.D_DUMMY somecontrols, group(GROUP) cluster(GROUP)

        You may also need to do this for some of your control vars.

        I would have liked to have seen the difference between the 2 numbers in your 2nd run equal .15, rather than .08. I am not sure if that had to be the case with clogit. But in any event clean up the clogit command first and then see if the apparent discrepancy persists.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

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

        Comment


        • #5
          the discrepancy does not persist. with the factor notation, dydx and at give the same results. thank you!

          but what about the high level from the at option? Average probabilities for this rare event should not be between 80% and 90%. is the unreported fixed effect negative or what? this is of minor importance to me, I just want to make sure to interpret the margins right.

          Comment


          • #6
            See the thread with the Samuels comments I mentioned earlier.
            -------------------------------------------
            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