Announcement

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

  • Average marginal effects for 4-level factor have different "order" than the logistic regression coefficients for this factor

    Hello!

    I have a dataset with about 10,000 observations. My dependent variable is binary ("Y") and my independent variable of interest is a 4-level factor ("X", levels: A, B, C, and D). I also include 4 additional factor variables as covariates ("var1"-"var4"). I cluster the standard errors on another factor variable ("var5"). I am interested in the "order" of effects of the 4 levels of the variable of interest. My hypothesis is that A > B > C > D with respect to the outcome.

    These are the commands that I run, along with the results:

    Code:
    logit Y i.X i.var1 i.var2 i.var3 i.var4 if in_sample, cl(var5)
    Code:
    X | Coef      | SE
    --+-----------+--------
    A | -         | -
    B | -0.232*   | (0.016)
    C | -1.184*** | (0.000)
    D | -1.031*** | (0.000)
    Code:
    margins, dydx(X)
    Code:
    X | dy/dx      | SE
    --+------------+--------
    A | -          | -
    B | -0.0376*   | (0.031)
    C | -0.0810*** | (0.000)
    D | -0.145***  | (0.000)
    So, if you look at the results from the logit, you'll see the coefficients for the factor go: A > B > D > C, but if you look at the results from the margins, you'll see the effects for the factor go: A > B > C > D. Why is it that the "order" of the levels is different in these two sets of results? Is this a problem? Which results do I believe? From these results, what can I say about the effect of being type A vs. B vs. C vs. D on the outcome?

    Thanks in advance!
    Guest

    PS: I have also run a probit model to the same end. I also ran pairwise Wald tests, and all four levels of the factor are significantly different from one another.
    PPS: I read the help file for margins and looked online for information about margins, average marginal effects, and so on, but I have found no clarity on this issue as of yet.
    Last edited by sladmin; 04 Sep 2018, 12:36. Reason: anonymize poster
Working...
X