Announcement

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

  • Marginal Effects after Firthlogit

    Dear Statalists,

    I have used mfx command after estimating firthlogit model, and the predicted Y shows negative (-1.199). The results are given below.

    Click image for larger version

Name:	0006.png
Views:	1
Size:	33.5 KB
ID:	1703569




    So I have converted firthlogit to logit and then used mfx command as given below. Predicted Y is now positive and less than 1, but the marginal coefficients have changed. Can I use these coefficients and predicted Y for my thesis?

    .
    . tempname B

    .
    . matrix define `B' = e(b)

    .
    . quietly logit mobilemoney female age agesq secondary tertiary incq1 incq2 incq3 incq4 employ rural mobileowner internetaccess wages transfers utilities remittance, asis iterate(0) from(`B', copy)

    .
    Click image for larger version

Name:	0007.png
Views:	1
Size:	23.9 KB
ID:	1703570
    Last edited by Ashraful Islam; 27 Feb 2023, 00:25.

  • #2
    In response to your private-messaging prodding, I'm sorry but I have never used -mfx- and don't know anything about it other than it seems to be the predecessor to -margins-, and so I cannot advise you here.

    I doubt if mentioning this helps you, but I would not use -margins- after -firthlogit- under conditions where I would not trust Wald test results or associated confidence intervals in the original regression table (output). Those conditions include separation and quasiseparation. There are alternatives to -firthlogit- and they are given in its helpfile. You could look into one or another of those to see whether it could be of use in your case.

    Comment


    • #3
      I used to use -mfx- occasionally before -margins- came out. The reason for the difference between the two results is written in the output.

      After firthlogit, the very second line says
      y = Linear prediction (predict)
      whereas after logit the second line says
      y = Pr(mobilemoney) (predict)
      So one is giving you a marginal effect on the linear prediction, whereas the other is giving you a marginal effect on the predicted probability. They are simply not directly comparable. They are related by Pr() = invlogit(linear prediction), and indeed if you check the values given in your outputs you will see that the second is indeed equal to invlogit(the first).

      If I recall, -mfx- had an option that enabled you to select what you wanted the marginal effect of. But as I haven't used it in years, I don't remember how it worked.

      You would be well advised to learn -margins-, including its -predict()- option (unless you are using an ancient pre-margins version of Stata).

      None of this, by the way, contradicts what Joseph Coveney has said in #2. And -margins-, in that respect, is not going to be different from -mfx-.

      Comment


      • #4
        Thanks a lot, @Coveney and @Schechter. These suggestions will help me a lot to improve my work.

        Comment

        Working...
        X