Announcement

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

  • Problem in adding individual dummy into logistic regression

    Dear Statalists,

    I am running a random-effects logistic model by the command -xtlogit depvar indepvar i.i, re vce(robust)-, where i refers to individual country
    But Stata only shows the following results without anything more. In my previous post, I got valuable comments from Maarten that countries i=266, 270, 384, 404, 686, 768 and 834 do not have any variation in dependent variable.

    So i would like to ask if there is any method to add country dummy to my model. My database consists of 45 countries and totally 900 observations.
    Thank you very much!

    note: 266.i != 0 predicts failure perfectly
    266.i dropped and 13 obs not used

    note: 270.i != 0 predicts success perfectly
    270.i dropped and 10 obs not used

    note: 384.i != 0 predicts success perfectly
    384.i dropped and 20 obs not used

    note: 404.i != 0 predicts success perfectly
    404.i dropped and 20 obs not used

    note: 686.i != 0 predicts success perfectly
    686.i dropped and 20 obs not used

    note: 768.i != 0 predicts success perfectly
    768.i dropped and 20 obs not used

    note: 834.i != 0 predicts success perfectly
    834.i dropped and 20 obs not used

  • #2
    Alex, it seems that Maarten already provided the answer. Have you tried to eliminate these countries with no variation across time? you will still remain with 38 countries which is not so bad. what happen if you drop these countries?

    Comment


    • #3
      Originally posted by Anat Tchetchik View Post
      Alex, it seems that Maarten already provided the answer. Have you tried to eliminate these countries with no variation across time? you will still remain with 38 countries which is not so bad. what happen if you drop these countries?
      Dear Anat,
      thank you. I drop these 7 countries, and then run the command. But Stata is just running without any output....

      Comment


      • #4
        Alex:
        as per -xtlogit- entry, Stata .pdf manual, page 257:
        Because the xtlogit likelihood function is calculated by Gauss–Hermite quadrature, on large problems the computations can be slow. Computation time is roughly proportional to the number of points used for the quadrature.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Alex, keep us posted whether a convergence has reached.

          Comment


          • #6
            Originally posted by Carlo Lazzaro View Post
            Alex:
            as per -xtlogit- entry, Stata .pdf manual, page 257:
            Dear Carlo
            Thank you. however, if I regress with only year dummy -xtlogit depvar indepvar i.year-, then there is not such a calculation problem (there are 20 years).
            So does the problem lie in that the number of individual dummy is large (42)?
            Besides, if I run fixed logit morel -xtlogit depvar indepvar, fe-, there is also not calculation problem.

            Actually, more than ten minutes have passed, but Stata still does not show any output (but still running)
            Last edited by Alex Mai; 26 Oct 2016, 08:02.

            Comment


            • #7
              Alex:
              the usual receipt (as Maarten suggested in a previous post on the same topic: http://www.statalist.org/forums/foru...tic-regression) is to start it all over again, add one predictor at time and see when the problem creeps up.
              As an aside, you do not post what Stata gave you back when it worked as expected. Hence, I find hard to reply more positively.
              Last edited by Carlo Lazzaro; 26 Oct 2016, 08:30.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Originally posted by Carlo Lazzaro View Post
                Alex:
                the usual receipt (as Maarten suggested in a previous post on the same topic: http://www.statalist.org/forums/foru...tic-regression) is to start it all over again, add one predictor at time and see when the problem creeps up.
                As an aside, you do not post what Stata gave you back when it worked as expected. Hence, I find hard to reply more positively.
                Dear Carlo,
                Thank you very much again. I try to change explanatory variables in the regression equation, as what Maarten suggested. Now the model with individual dummy (i.i) can work, but only after dropping the option of robust standard errors.
                For example:
                If the command is -xtlogit depvar indepvar i.i, re-, then Stata gives the normal regression results. everything is correct.
                However, if vce(robust) is added, say -xtlogit depvar indepvar i.i, re vce(robust)-, then Stata only gives a red error warning: calculation of robust standard errors failed.
                But if time dummy, instead of individual dummy, is added (-xtlogit depvar indepvar i.year, re vce(robust)-), then stata can also give normal results.

                I know that the option of vce(robust) cannot be handled after -xtlogit fe-. But I am not sure about why after adding individual dummy, vce(robust) cannot be handled in -xtlogit re- too.
                Last edited by Alex Mai; 26 Oct 2016, 09:31.

                Comment


                • #9
                  Alex:
                  with the -i.i- predictor you're probably asking too much out of your data.
                  Again, please post what Stata gave you back, so that the interested listers can give you more helpful replies. Thanks.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment

                  Working...
                  X