Announcement

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

  • xtlogit does not converge (not concave)

    Dear Statalist

    I'm having difficulties trying estimate the following model working with panel data and a binary dependent variable

    Code:
     xtlogit Gov i.v2x_regime_lag cgdppc_lag max_rdiscl_lag NHIxl_lag cinc_lag Total_Oil_Income_PC_lag peace_year_lag decay_function_lag Americas Europe MENA Asia Africa if e2==1, vce(cluster country_name_numeric)
    Gov = binary
    Regions (Americas, Europe, MENA, Asia, Africa) = binary
    v2x_regime_lag = categorical
    Other variables = continuous

    +6000 observations

    The result from the xtlogit is as follow:

    Code:
     Fitting comparison model:
    Iteration 0:   log pseudolikelihood = -665.12183  
    Iteration 1:   log pseudolikelihood = -638.32856  
    Iteration 2:   log pseudolikelihood = -630.81981  
    Iteration 3:   log pseudolikelihood = -630.49594  
    Iteration 4:   log pseudolikelihood = -630.48068  
    Iteration 5:   log pseudolikelihood = -630.47707  
    Iteration 6:   log pseudolikelihood = -630.47634  
    Iteration 7:   log pseudolikelihood = -630.47622  
    Iteration 8:   log pseudolikelihood = -630.47619  
    Iteration 9:   log pseudolikelihood = -630.47618 
    
    Fitting full model:
    
    tau =  0.0     log pseudolikelihood = -630.47618
    tau =  0.1     log pseudolikelihood =  -630.8826
    
    Iteration 0:   log pseudolikelihood =  -630.8826  
    Iteration 1:   log pseudolikelihood = -630.49654  
    Iteration 2:   log pseudolikelihood = -630.45437  
    Iteration 3:   log pseudolikelihood = -630.44726  
    Iteration 4:   log pseudolikelihood = -630.44694  
    Iteration 5:   log pseudolikelihood = -630.44694  (not concave)
    Iteration 6:   log pseudolikelihood = -630.44694  (not concave)
    Iteration 7:   log pseudolikelihood = -630.44694  (not concave)
    Iteration 8:   log pseudolikelihood = -630.44694  (not concave)
    Iteration 9:   log pseudolikelihood = -630.44694  (not concave)
    .
    .
    Iteration 257:   log pseudolikelihood = -630.44694  (not concave)
    We have tried to insert the difficult option, however, that does not work. Furthermore we have inspected for any possible measurement errors in the regional dummies because without the model works. If we drop one regional dummy from the regression the model converges. Any suggestions?

    //Marco Liedecke

  • #2
    Marco,

    It looks like you have manually created dummy variables. Did you omit one category (i.e. the base category)? I have a hunch that this could be the cause if you didn't.

    A side note: you do not need to manually create dummy variables; you could use the factor variable syntax, e.g. (assuming you have or you create a categorical variable for region)

    Code:
    help fvvarlist
    xtlogit Gov i.v2x_regime_lag cgdppc_lag max_rdiscl_lag NHIxl_lag cinc_lag Total_Oil_Income_PC_lag peace_year_lag decay_function_lag i.region if e2==1, vce(cluster country_name_numeric)
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment


    • #3
      Thank you Weiven Ng

      The problem have been solved

      /Marco Liedecke

      Comment


      • #4
        Originally posted by Marco Liedecke View Post
        Thank you Weiven Ng

        The problem have been solved

        /Marco Liedecke
        You didn't say specifically, but it sounds like the problem was the fact that you didn't omit one category after all. Well, when I started my PhD program, this was the first mistake I made in Stata programming for my intro stats course. I am glad this was a simple solution!
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment

        Working...
        X