Announcement

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

  • Ordered logit regression on panel data

    Dear readers,
    I am using Stata 15. I am trying to run an ordered logit regression on panel data with the following characteristics:
    Code:
    . xtset teamid year
           panel variable:  teamid (unbalanced)
            time variable:  year, 1990 to 2005
                    delta:  1 unit
    The dependent variable is an ordinal variable with minimum value of 1 and maximum value of 6. I am using 8 independent variables (the first three variables are binary, while the others are discrete or continuous). When I run -xtologit-, I can see that "LR test vs. ologit model" gives me zero degrees of freedom. See below. I don't know how I can interpret the result of the test. Is there anything wrong that I am doing with the code or with the model?
    I don't know why I get 0 degrees of freedom using 8 independent variables even if I have 423 observations in total. Is it because the minimum number of observations per group is 9? Given the following results, can I stick to the -xtologit- model or do I need to switch to a different model? Thank you.
    Code:
     xtologit season_perf TMTMplayoffL1 TMTMconferencesemifinalsL1 TMTMnbachampionL1 yearsin
    > team firstyearinteam PERprvs3ssn team_current_injury5 teamsimexp
    
    Fitting comparison model:
    
    Iteration 0:   log likelihood = -601.26536  
    Iteration 1:   log likelihood = -500.94447  
    Iteration 2:   log likelihood =   -494.676  
    Iteration 3:   log likelihood = -494.52421  
    Iteration 4:   log likelihood = -494.52414  
    Iteration 5:   log likelihood = -494.52414  
    
    Refining starting values:
    
    Grid node 0:   log likelihood = -505.95414
    
    Fitting full model:
    
    Iteration 0:   log likelihood = -505.95414  (not concave)
    Iteration 1:   log likelihood = -499.68727  (not concave)
    ...
    Iteration 47:  log likelihood = -494.52414  (backed up)
    
    Random-effects ordered logistic regression      Number of obs     =        423
    Group variable: teamid                          Number of groups  =         29
    
    Random effects u_i ~ Gaussian                   Obs per group:
                                                                  min =          9
                                                                  avg =       14.6
                                                                  max =         15
    
    Integration method: mvaghermite                 Integration pts.  =         12
    
                                                    Wald chi2(8)      =     168.86
    Log likelihood  = -494.52414                    Prob > chi2       =     0.0000
    
    ----------------------------------------------------------------------------------------
               season_perf |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -----------------------+----------------------------------------------------------------
             TMTMplayoffL1 |   .9466701   .2482169     3.81   0.000     .4601739    1.433166
    TMTMconferencesemifi~1 |   1.369127   .2581991     5.30   0.000     .8630663    1.875188
         TMTMnbachampionL1 |   1.933308   .5662724     3.41   0.001     .8234347    3.043182
               yearsinteam |   .3753574   .2108604     1.78   0.075    -.0379213    .7886362
           firstyearinteam |  -2.427727   .8950941    -2.71   0.007     -4.18208   -.6733752
               PERprvs3ssn |   .3886468   .0881193     4.41   0.000     .2159361    .5613575
      team_current_injury5 |   .0761697   .0677475     1.12   0.261    -.0566131    .2089524
                teamsimexp |  -1.994576    1.06875    -1.87   0.062    -4.089288    .1001358
    -----------------------+----------------------------------------------------------------
                     /cut1 |   4.386512   1.558613                      1.331687    7.441338
                     /cut2 |   6.155003   1.573321                      3.071351    9.238656
                     /cut3 |   7.336614   1.586068                      4.227978    10.44525
                     /cut4 |   8.300373   1.597244                      5.169831    11.43091
                     /cut5 |   9.201347   1.613779                      6.038399     12.3643
    -----------------------+----------------------------------------------------------------
                 /sigma2_u |   3.50e-32   7.76e-17                             .           .
    ----------------------------------------------------------------------------------------
    LR test vs. ologit model: chi2(0) = 0.00                  Prob > chi2 =      .

  • #2
    Jacopo it seems to me that the problem is that for some panel units you don't have enough observations. You have 8 parameters (not to mention the thresholds parameters) which may be problematic in terms of df despite the overall large number of obs. I would start reducing the number of params. to say, two or three, just to see if this solves the problem.

    Comment


    • #3
      Thank Anat for your response. I tried to reduce the number of independent variables from 8 to 5. Now the degrees of freedom of "LR test vs. ologit model" are 1. This is what I obtained:
      Code:
      xtologit season_perf TMTMplayoffL1 TMTMconferencesemifinalsL1 firstyearinteam PERprvs3s
      > sn teamsimexp
      
      Fitting comparison model:
      
      Iteration 0:   log likelihood = -601.26536  
      Iteration 1:   log likelihood = -506.63544  
      Iteration 2:   log likelihood = -502.81306  
      Iteration 3:   log likelihood = -502.80427  
      Iteration 4:   log likelihood = -502.80427  
      
      Refining starting values:
      
      Grid node 0:   log likelihood = -511.35443
      
      Fitting full model:
      
      Iteration 0:   log likelihood = -511.35443  (not concave)
      Iteration 1:   log likelihood = -505.22737  (not concave)
      Iteration 2:   log likelihood = -502.99282  
      Iteration 3:   log likelihood = -502.67803  
      Iteration 4:   log likelihood =  -502.6736  
      Iteration 5:   log likelihood = -502.67359  
      
      Random-effects ordered logistic regression      Number of obs     =        423
      Group variable: teamid                          Number of groups  =         29
      
      Random effects u_i ~ Gaussian                   Obs per group:
                                                                    min =          9
                                                                    avg =       14.6
                                                                    max =         15
      
      Integration method: mvaghermite                 Integration pts.  =         12
      
                                                      Wald chi2(5)      =     137.97
      Log likelihood  = -502.67359                    Prob > chi2       =     0.0000
      
      ----------------------------------------------------------------------------------------
                 season_perf |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -----------------------+----------------------------------------------------------------
               TMTMplayoffL1 |   .9726754   .2606753     3.73   0.000     .4617613    1.483589
      TMTMconferencesemifi~1 |   1.537411   .2592291     5.93   0.000     1.029332    2.045491
             firstyearinteam |  -3.148207   .7788799    -4.04   0.000    -4.674784   -1.621631
                 PERprvs3ssn |   .3763192   .0905499     4.16   0.000     .1988447    .5537938
                  teamsimexp |  -2.024643   1.090424    -1.86   0.063    -4.161833    .1125484
      -----------------------+----------------------------------------------------------------
                       /cut1 |   2.913362   1.441067                      .0889222    5.737802
                       /cut2 |   4.668063   1.453776                      1.818714    7.517412
                       /cut3 |   5.818683   1.466154                      2.945074    8.692293
                       /cut4 |   6.754031   1.479508                      3.854248    9.653813
                       /cut5 |   7.580767   1.494963                      4.650692    10.51084
      -----------------------+----------------------------------------------------------------
                   /sigma2_u |   .0531939   .1138834                      .0008008    3.533523
      ----------------------------------------------------------------------------------------
      LR test vs. ologit model: chibar2(01) = 0.26          Prob >= chibar2 = 0.3046
      It seems that by reducing the number of independent variables the problem was solved. Given the Prob >= chibar2 >0.05, can I run simply -ologit, vce (cluster teamid)-? Thank you.

      Comment

      Working...
      X