Announcement

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

  • xtlogit re: margins dydx command fails to produce results

    Dear STATA users,

    Greetings!

    I am working with a panel data that contains 157,774 observations relevant for my research model (time period: 2012-2018). My DV is a dummy variable referring to FDI ownership type (joint venture=1; wholly-owned subsidiary=0). I have three predictors (all continuous type variables) and some controls (firm-level information), and I was able to obtain statistically significant outcomes with these predictors after running xtlogit re (it takes a while to run, around 2-2.5 hours, but it works well).

    However, after entering the following command - margins, dydx(*) predict(pr) - I was not able to obtain results concerning marginal effects (I left my computer running this command over night, but nothing happened). I tried to look into other discussions on similar topic, but I did not find an explanation for why this could have happened. Does it have to do something with the data - or with the model? Or did I just use the wrong margins command?

    Thank you for your replies in advance!

  • #2
    -margins- is very computationally intensive after a mutilevel logistic regression. I think you just did not wait long enough for it to finish. If -xtlogit, re- itself took over 2 hours to run, you should expect -margins- to take many days to run. I recently did an analysis like this where -melogit- took 1 hour to run. The subsequent -margins- command needed 2 weeks to finish.

    If you do not need standard errors for the -margins- results, the -nose- option will save you some of that time. But you should still expect it to be slow.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      -margins- is very computationally intensive after a mutilevel logistic regression. I think you just did not wait long enough for it to finish. If -xtlogit, re- itself took over 2 hours to run, you should expect -margins- to take many days to run. I recently did an analysis like this where -melogit- took 1 hour to run. The subsequent -margins- command needed 2 weeks to finish.

      If you do not need standard errors for the -margins- results, the -nose- option will save you some of that time. But you should still expect it to be slow.

      Thank you for the reply, Clyde!

      I had no idea it can take this long... But now it makes sense. I'll look into what I can do about it!

      Comment

      Working...
      X