Announcement

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

  • r(1400) "initial values not feasible" after xtmelogit

    Hello,

    I am using Stata 14.1 and trying a logit multilevel model using xtmelogit. My dependent variable (support for sanctions) is binary. I have three Level 1 variables and three Level 2 variables. There are 1386 observations (delegates) nested in 35 groups (countries).

    The model requires random slopes and this runs normally. However, once I try to include an interaction between two Level 1 variables and still model random slope for one Level 1 variable, Stata returns an error – r(1400) “initial values not feasible”.

    This is the first time that I am using multilevel models, so apologies if my question and understanding of the method is still somewhat pedestrian. I have tried various options suggested on different statalist posts, including running a simple logit model to generate start values and use this in xtmelogit, and using meqrlogit. This has not solved the problem and r(1400) still appears.

    Level 1 variables are cluster mean centred and level 2 variables general mean centred, following suggestions in Enders & Tofighi, 2007, Centering Predictor Variables in Cross-Sectional Multi-level Models, Psychological Methods, 12(2): 121-138.

    This is the code and output:


    Code:
      xtmelogit support_sanctions same_group_cmc c.galtan_cmc##c.eu_position_cmc fh_democracy_gmc dom_threat_gmc alliance_gmc || country_code:, var
    
    Refining starting values: 
    
    Iteration 0:   log likelihood = -255.51295  
    Iteration 1:   log likelihood =  -243.6281  
    Iteration 2:   log likelihood = -243.25204  
    
    Performing gradient-based optimization: 
    
    Iteration 0:   log likelihood = -243.25204  
    Iteration 1:   log likelihood = -243.16193  
    Iteration 2:   log likelihood = -243.16158  
    Iteration 3:   log likelihood = -243.16158  
    
    Mixed-effects logistic regression               Number of obs     =      1,386
    Group variable: country_code                    Number of groups  =         35
    
                                                    Obs per group:
                                                                  min =          3
                                                                  avg =       39.6
                                                                  max =        168
    
    Integration points =   7                        Wald chi2(7)      =     267.04
    Log likelihood = -243.16158                     Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------------------------
                 support_sanctions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------------------------+----------------------------------------------------------------
                    same_group_cmc |   -7.41112   .5314932   -13.94   0.000    -8.452828   -6.369412
                        galtan_cmc |  -.5657813   .0849425    -6.66   0.000    -.7322656    -.399297
                   eu_position_cmc |   .9577909   .1164325     8.23   0.000     .7295874    1.185994
                                   |
    c.galtan_cmc#c.eu_position_cmc |   .1812839   .0461681     3.93   0.000      .090796    .2717717
                                   |
                  fh_democracy_gmc |  -2.351667   .5733913    -4.10   0.000    -3.475493   -1.227841
                    dom_threat_gmc |  -.0420392   .0485249    -0.87   0.386    -.1371462    .0530678
                      alliance_gmc |  -.2298118   .7921718    -0.29   0.772     -1.78244    1.322816
                             _cons |   1.197772    .359915     3.33   0.001     .4923514    1.903192
    ------------------------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
      Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
    -----------------------------+------------------------------------------------
    country_code: Identity       |
                      var(_cons) |   2.789726   1.009386      1.372706    5.669509
    ------------------------------------------------------------------------------
    LR test vs. logistic model: chibar2(01) = 103.60      Prob >= chibar2 = 0.0000
    
    . display "FYI: The deviance of the CIM is " -2*e(ll)
    FYI: The deviance of the CIM is 486.32317
    
    . estimate store CIM
    
    . 
    . xtmelogit support_sanctions same_group_cmc c.galtan_cmc##c.eu_position_cmc fh_democracy_gmc dom_threat_gmc alliance_gmc || country_code: galtan_cm
    > c, var
    
    Refining starting values: 
    
    initial values not feasible
    r(1400);
    
    end of do-file
    
    r(1400);


    This is an example of my data generated by dataex:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int support_sanctions float(eu_position_cmc galtan_cmc same_group_cmc fh_democracy_gmc dom_threat_gmc alliance_gmc) long country_code
    1  .4000001 -1.2800002 -.14285715 -.23844123 23.504677 -.8678996 3
    0      -3.7       3.52 -.14285715 -.23844123 15.764676 -.8678996 3
    0      -3.7       3.52 -.14285715 -.23844123 15.764676 -.8678996 3
    1  .4000001 -1.2800002 -.14285715 -.23844123 15.764676 -.8678996 3
    1  .4000001 -1.2800002 -.14285715 -.23844123 15.764676 -.8678996 3
    1 1.0999999  1.9199996 -.14285715 -.23844123 15.764676 -.8678996 3
    1  .7000003      -2.38 -.14285715 -.23844123 15.764676 -.8678996 3
    0      -3.7       3.52 -.14285715 -.23844123 15.764676 -.8678996 3
    1 1.0999999  1.9199996 -.14285715 -.23844123 15.764676 -.8678996 3
    0 1.0999999  1.9199996   .8571429 -.23844123 15.764676 -.8678996 3
    end
    label values country_code country_code
    label def country_code 3 "AT", modify

    Is there a way to get around this error message and estimate the model? The final model is supposed to include a cross-level interaction in addition to this, but I am not able to even examine it as I am still stuck with the level 1 interaction. Any advice would be much appreciated.

    Thank you.
    Last edited by Sabina Avdagic; 13 Mar 2018, 08:05.

  • #2
    Are you running an old version of Stata? -xtmelogit- is the old name; in current versions of Stata it is called -melogit-. Now, changing the name of the command won't solve this problem. But I ask, because if you are running a current version of Stata then you can try the other mixed-model logistic estimation command: -meqrlogit-, which sometimes will converge when -melogit- fails. No guarantees, but it's worth a try.

    Comment


    • #3
      Thank you, Clyde. I started these models with Stata 12 on my laptop, but I have in the meantime shifted to version 14.1 in my office, although I didn't change the do file and so continued to use -xtmelogit-. I mentioned in my original post that I tried -meqrlogit- and this produced the same error. Now, surprisingly, I just tried -melogit- and the model ran normally. Like you, I thought that simply changing from -xtmelogit- to -melogit- would not make a difference. Do you have any idea why it does?

      Comment


      • #4
        I mentioned in my original post that I tried -meqrlogit- and this produced the same error.
        Indeed, you did. I'm sorry I missed that.

        So I think it is the result of two things.

        1. When you run -xtmelogit- on version 14, Stata gives you -meqrlogit-, not -melogit-. So that explains why -meqrlogit- was no better: it was exactly the same.

        2. -melogit- itself has been rewritten at least once, and the current version is a bit more robust to difficult data than the earlier versions. So I think it was actually the move to version 14 and to -melogit-, combined, that did it.

        Comment


        • #5
          Thank you, Clyde. That makes sense.

          Comment

          Working...
          X