Announcement

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

  • xtlogit and time of computation

    Hi all,
    I have to apply a logistic regression, I run the command:
    Code:
    xi: xtlogit dep_var i.var1 i.var2 i.var3 i.var4 i.var5, i(Country)
    I receive after some minutes:
    Code:
      (omissis) Fitting full model:
      
      tau =  0.0     log likelihood = -14742.453
      tau =  0.1     log likelihood = -14316.451
      tau =  0.2     log likelihood =  -14312.88
      tau =  0.3     log likelihood = -14342.017
    And here it blocks.

    The dataset is a survey composed by 50,000 replies and I can imagine it's quite a lot especially if studying many variables.
    1) How can I make it not to block?
    2) How can I improve the elaboration time?
    3) Is there a way to see how much Stata has done?

    Thanks a lot!

  • #2
    It is hard to give concrete advice for this situation. But here are some general approaches you can try:

    A. -tabulate- your dependent variable against each of your independent variables. If there are some cells that are very small, that can make estimation very difficult. You might need to consider combining categories in some of your independent variables.

    B. Experiment re-running the regression starting with just one predictor, then add in another, and another, and see at what point it breaks.

    C. Try the alternative integration method with the -intmethod(ghermite)- option and see if that works better.

    D. For purely speeding-up purposes, you can decrease the number of integration points by setting the -intpoints()- option. But be careful about this because the accuracy of your results may be degraded.

    As far as I know, there is no way to see the intermediate results at this stage in the calculations. Had you gotten past the "Fitting full model" part to the final round of iterations, you could set the -iterate()- option to end the calculation at the point where it starts to hang up, but as far as I know, you cannot do this here.

    You can also estimate random effects logistic regression models with the-melogit- and -meqrlogit- commands. The last, in particular, often does better with "difficult" models.

    Finally, though it is not the cause of any of the problems you report here, if you are using a recent version of Stata you should not be using the xi: prefix. You should, instead, be using factor variable notation in your model (see -help fvvarlist-).

    Hope this helps.
    Last edited by Clyde Schechter; 15 Feb 2015, 12:13.

    Comment

    Working...
    X