Announcement

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

  • xtlogit, calculation of robust standard errors failed

    Dear stata users,

    I have a problem with the estimation of robust standard errors running a random effects model with a binary dependent variable.
    I use a very simple model to show the problem. If I run the following model on my 7-wave panel data there are no problems (age is a continious variable that varies over time, east is a time-constant dummy, n is sufficiently large and there is variation in every variable with infertile)

    Code:
     xtlogit infertile2 c.age i.east2 if filter2==1, re or
    But if I request the same model with robust standard errors I receive the error message that the "calculation of robust standard errors failed"

    Code:
    xtlogit infertile2 c.age i.east2 if filter2==1, re or vce(robust)
    I use stata/SE14.2 with the most recent updates. I found posts on statalist from last year that had similar problems. For example here: http://www.statalist.org/forums/foru...tic-regression
    And here: http://www.statalist.org/forums/foru...-calculate-bug

    The problem appears to have something to with the factor variable notation. While writing this post I used the same command without the factor variable notation and it appears to have worked:

    Code:
    xtlogit infertile2 age east2 if filter2==1, re or vce(robust)
    I tried it with more complex models (more variables) and it works as long as I dont mark the binary variables with i.
    The problem is that this work-around doesnt help with categorial variables with more than two categories (I will generate dummies for these if necessary). I wonder if stata now really did want I wanted it do? Any comments and suggestions to what is happening here are welcome. I hope I did not miss any problem with my model. I assume this is of interest to other stata users as well.

    Jasmin
    Last edited by Jasmin Passet; 04 Apr 2017, 10:49.

  • #2
    FWIW, I'm not able to reproduce your problem I have just run several -xtlogit, re or vce(robust)- commands to try to provoke this same error, but all of them just ran normally and successfully.. I wonder if it is somehow a problem specific to your data set. Can you post a data example that triggers the problem?

    Comment


    • #3
      Dear Clyde,

      thank you for your reply. I totally didn't see it, but now I went through my syntax again, compared it with an older version and I believe I found the problem. I made some changes to the dofile and inserted a mi set command to look at my missing values somewhere between xtset and the regression command. If I mi unset and then xt set the data again everything works as it should. (But I can still get the robust se when the data are mi set if I dont use factor variable notation)

      Comment

      Working...
      X