Announcement

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

  • Margins after XTLOGIT

    Dear all,

    Thank you for your attention.

    I am running the following code and I am having some problems interpreting the margins plot.

    Code:
    xtlogit IPO_MA c.collabsAllallyrs##c.collabsAllallyrs $Controls $MainVarsAll, re vce (robust)
    margins, at(c.collabsAllallyrs =(0(20)200)) atmeans vsquish post
    marginsplot
    The DV is a dummy variable, while c.collabsAllallyrs is a continuous measure. With plot I get the attached graph.
    The xtlogit coefficient for the main variable c.collabsAllallyrs is 0.02546 and the squared measure is -0.00016, the constant is -3.93341.

    I have a few questions:
    - is the code right?
    - how do I interpret the negative margins? i.e. what is the change in likelihood of the DV happening (e.g. IPO) associated with a change in IV (i.e. syndicate prior co-investments)?
    - are the margins negative because the constant coefficient is negative ( -3.93341)? Should I add the constant to the margins to have an "interpretable" coefficient for the margins?

    Thank you in advance for your time,

    Cristiano

    Click image for larger version

Name:	Screen Shot 2018-07-11 at 09.33.10.png
Views:	2
Size:	46.7 KB
ID:	1452770



    Attached Files

  • #2
    1. Is the code right? The code is a correct command to estimate a random effects logistic regression model, in panel data, of IPO_MA on linear and quadratic terms in a continuous variable collabsAllallyrs, along with certain (here) unspecified covariates. Whether such a model makes sense in the context of your research goals, and whether your data are suitable for it cannot be determined from what you have shown. But if that is what you want to model, the code implements it correctly.

    2. These results do not make sense, at least not in Stata version 15. Are you using an older Stata? In current Stata, the default output of -margins- following -xtlogit- is marginal probabilities, and they are always between 0 and 1. It looks to me more like you have gotten the marginal values of log odds(outcome) (i.e. xb) instead. If memory serves, -xb- used to be the default output, and my guess is that is what you are seeing here. If that is the case, re-running -margins- specifying the -predict(pr)- option, and then re-running -marginsplot- will get you a graph of predicted probabilities instead, and the interpretation of that will be more natural.

    3. "what is the change in likelihood of the DV happening (e.g. IPO) associated with a change in IV (i.e. syndicate prior co-investments)?" You will not get the answers to that question from this -margins- command. What you need for that is -margins, dydx(collabsAllallyrs) predict(pr) at(c.collabsAllallyrs =(0(20)200)) atmeans- You can also -marginsplot- that if you like, but you will be just read those marginal effects directly from the output of this -margins- command.

    4. "are the margins negative because the constant coefficient is negative ( -3.93341)?"
    Yes, and because the other terms in the model do not become large enough over the observed range of collabsAllallyrs to bring xb into positive territory. "Should I add the constant to the margins to have an "interpretable" coefficient for the margins?" No. As stated in numbered paragraph 2 of this response, what you have here are not marginal probabilities, and just shifting the axis to make them positive is not going to turn them into marginal probabilities. You have to do what I advise in 2.

    Added: the situation in paragraph 2 could actually arise in Stata version 15 if the code in question is being run under version control set to an earlier version of Stata. In that case, -margins- would revert to its former default options.

    Comment


    • #3
      Clyde, thank you very much for your extensive and super useful answer. I am running Stata 13.1. I will try what you have suggested and see if it works. Hopefully I won't have any more questions. Thank you again, very useful and appreciated.

      Comment


      • #4
        In the end it worked, I have used margins, predict(pr) at(c.collabsAllallyrs =(0(20)200)) atmeans. As you mentioned, the predict (pr) was not available on the version I have on my laptop but I have 14 on desktop.

        Thank you again Clyde, really appreciated.

        Cristiano

        Comment

        Working...
        X