Announcement

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

  • Robust SEs with XTPROBIT - cannot calculate - bug(?)

    There seems to be a bug in using time series variables with xtprobit/xtlogit and robust SEs. It has been reported and discussed before here:

    http://www.statalist.org/forums/foru...bit-or-xtlogit
    http://www.statalist.org/forums/foru...atory-variable
    http://www.statalist.org/forums/foru...s-with-xtlogit

    It was reported fixed in the first thread, but apparently it's not. I have the latest stata 14 SE (march 30 2016). Here's an output sample to show the issue:

    Code:
    xtprobit f.Y x1 x2 x3 x4 x5 x6
    
    Random-effects probit regression                Number of obs     =    898,717
    Group variable: i                               Number of groups  =    152,358
    
    Random effects u_i ~ Gaussian                   Obs per group:
                                                                  min =          1
                                                                  avg =        5.9
                                                                  max =          6
    
    Integration method: mvaghermite                 Integration pts.  =         12
    
                                                    Wald chi2(6)      =   23273.05
    Log likelihood  = -549726.75                    Prob > chi2       =     0.0000
    
    -----------------------------------------------------------------------------------
                  F.Y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                   x1 |   4.20e-07   5.66e-09    74.16   0.000     4.09e-07    4.31e-07
                   x2 |   .0144303   .0001676    86.08   0.000     .0141017    .0147588
                   x3 |   .0711422   .0012444    57.17   0.000     .0687032    .0735812
                   x4 |  -.1926475   .0061751   -31.20   0.000    -.2047504   -.1805445
                   x5 |  -.3055726   .0232097   -13.17   0.000    -.3510627   -.2600824
                   x6 |   .0802345   .0062972    12.74   0.000     .0678922    .0925768
                _cons |  -1.352513   .0094188  -143.60   0.000    -1.370974   -1.334052
    ------------------+----------------------------------------------------------------
             /lnsig2u |  -.6555548   .0072311                     -.6697276   -.6413821
    ------------------+----------------------------------------------------------------
              sigma_u |   .7205234   .0026051                      .7154355    .7256474
                  rho |   .3417389   .0016267                      .3385578    .3449342
    -----------------------------------------------------------------------------------
    LR test of rho=0: chibar2(01) = 7.2e+04                Prob >= chibar2 = 0.000
    
    . xtprobit f.Y x1 c.x2##c.x2 x3 x4 x5 x6, vce(robust)
    
    Fitting comparison model:
     
    Calculating robust standard errors:
    calculation of robust standard errors failed
    r(198);
    
    . gen f_Y2 = f.Y
    
    . xtprobit f_Y2 x1 c.x2##c.x2 x3 x4 x5 x6, vce(robust)
    
    Calculating robust standard errors:
    
    Random-effects probit regression                Number of obs     =    898,717
    Group variable: i                               Number of groups  =    152,358
    
    Random effects u_i ~ Gaussian                   Obs per group:
                                                                  min =          1
                                                                  avg =        5.9
                                                                  max =          6
    
    Integration method: mvaghermite                 Integration pts.  =         12
    
                                                    Wald chi2(7)      =   26456.46
    Log pseudolikelihood  = -548620.13              Prob > chi2       =     0.0000
    
                                         (Std. Err. adjusted for 152,358 clusters in i)
    -----------------------------------------------------------------------------------
                      |               Robust
             f_Y2     |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
                   x1 |   3.65e-07   8.70e-09    41.90   0.000     3.48e-07    3.82e-07
                   x2 |   .0601118    .001042    57.69   0.000     .0580695     .062154
                      |
            c.x2#c.x2 |  -.0004426   .0000103   -42.99   0.000    -.0004628   -.0004224
                      |
                   x3 |   .0513391   .0014949    34.34   0.000     .0484092     .054269
                   x4 |  -.1632547   .0069597   -23.46   0.000    -.1768954   -.1496139
                   x5 |   -.328031   .0195098   -16.81   0.000    -.3662695   -.2897925
                   x6 |   .0809134   .0061836    13.09   0.000     .0687937    .0930331
                _cons |  -2.369385   .0233229  -101.59   0.000    -2.415097   -2.323673
    ------------------+----------------------------------------------------------------
             /lnsig2u |  -.6275059   .0070927                     -.6414073   -.6136045
    ------------------+----------------------------------------------------------------
              sigma_u |   .7306995   .0025913                      .7256383    .7357961
                  rho |   .3480763   .0016095                      .3449285    .3512374
    -----------------------------------------------------------------------------------

    As you can see, i'm fitting a model with a lead on Y as the dependent variable.
    The model with the regular vce estimates without an issue. trying robust SEs results in:
    Calculating robust standard errors:
    calculation of robust standard errors failed

    r(198);

    Yet generating the variable "by hand" as f_Y2 and requiesting robust SEs estimates without an issue. you can see that the number of observations and panel units is the same for all three regression commands, so this is most probably indeed a bug.


  • #2
    Ariel found a bug in xtprobit. The same bug is also present in xtlogit. We will have it fixed in a future update.

    Comment


    • #3
      Bug reported as fixed in May 19 update:

      34. xtlogit and xtprobit with option vce(robust) or option vce(cluster panelvar), when any of the variables in the model were specified with a time-series operator, incorrectly exited with error message "calculation of robust standard errors failed". This has been fixed.
      http://www.stata.com/help.cgi?whatsnew

      Comment


      • #4
        please disregard this comment
        Last edited by Ariel Karlinsky; 17 Nov 2016, 01:46. Reason: was fixed on November update

        Comment

        Working...
        X