Announcement

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

  • The error of quadrature point when adding country dummy to logistic regression

    Hello Statalists,

    I am running a logistic model -xtlogit depvar indepvar i*, re vce(robust)-, where i refers to country dummy that is generated by -tab i, gen(i)-. There are totally 45 countries, and thus I have from i1 to i45. But when I run the command, Stats shows "number of quadrature points must be less than or equal to number of obs" (r198). There are totally 900 observations in my database.

    I really appreciate if anyone could tell me where the problem is, and if my way to add country dummy to the Random-effects logistic model is correct.

    I do not use Fixed-effects logistic model, because it cannot deal with robust standard errors, and I follow the method in previous posts to add a country dummy to RE logistic model.

    Thank you very much.

  • #2
    What happens when you use the factor variable notation (see: help fvvarlist) to include the country indicator (dummy) variables?

    Code:
    xtlogit depvar indepvar i.i, re vce(robust)
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Originally posted by Maarten Buis View Post
      What happens when you use the factor variable notation (see: help fvvarlist) to include the country indicator (dummy) variables?

      Code:
      xtlogit depvar indepvar i.i, re vce(robust)
      Dear Maarten,

      thank you. When I use the command mentioned in your reply, Stata shows:

      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

      And Stats is still running without producing any more result.

      Thank you again!

      Comment


      • #4
        Dear Maarten,

        I think I may find out the reason, because the variable of country in my database is each country's international code (e.g. 56 and 98), instead of from 1 to n. I will try to modify it and then try again

        Comment


        • #5
          This is probably not the answer you are looking for, but it sounds like your model is just too complicated for your data. For starters there are various countries (266, 270, 384, 404, 686, 768, 834) you cannot use, as there is no variation in the dependent variable within those countries. But in the remaining countries there appears to be insufficient information to estimate the model. So I would start by simplifying the model, and see when the model starts converging. This will give you an idea of what the problem might be.
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment


          • #6
            Originally posted by Maarten Buis View Post
            This is probably not the answer you are looking for, but it sounds like your model is just too complicated for your data. For starters there are various countries (266, 270, 384, 404, 686, 768, 834) you cannot use, as there is no variation in the dependent variable within those countries. But in the remaining countries there appears to be insufficient information to estimate the model. So I would start by simplifying the model, and see when the model starts converging. This will give you an idea of what the problem might be.
            Thank you. I modify the country code by using the number from 1 to n to identify each country, and the result does not change. Stata still shows the errors. So I think I have to drop the option of country dummy from my model.

            Comment

            Working...
            X