Announcement

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

  • Inconsistent estimation of average marginal effects for mlogit

    Hi everyone!
    I am running a multinomial logistic regression with mlogit and want to obtain the average marginal effects for all outcomes.
    My estimation is the following:

    mlogit EKC b4.Env_Degradation i.Region GDP POPURB INSSOC INDUSTRY TRADE FDI RENEWABLE, vce(cluster study)
    margins, dydx (*) pr(out(1))
    margins, dydx (*) pr(out(2))
    margins, dydx (*) pr(out(3))

    whereby EKC is a categorical variable with three different outcomes.
    When I rerun the exact same code several times, I receive the same coefficients, but the standard errors are slightly different every time.

    In a similar regression with slightly different control variables I sometimes receive the error: "Warning: variance matrix is nonsymmetric or highly singular", but when I rerun the exact same regression again, the estimation often works.

    Is this a general problem in Stata when calculating marginal effects for mlogit? Or is there something wrong with my code?
    I ran this in both Stata14 and Stata17 and standard errors were changing in both versions.

    Thank you for your help!

  • #2
    In case someone will encounter the same problem in the future.
    Finally, I found the cause of this weirdly inconsistent estimation of standard errors. There is one dummy variable, which is roughly 98% 1, 2% 0. When I exclude this variable from the model, all regressions run perfectly fine and there are no more changing standard errors.

    Comment


    • #3
      As a sidelight, unless you are using an ancient version of Stata (13 or older), there is no need to specify results outcome by outcome. Stata 14+ will do them all at once for you. For more, see

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

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

      Comment

      Working...
      X