Announcement

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

  • Cluster standard error for random effect logit model - without vce(bootstrap)?

    [COLOR=rgba(0, 0, 0, 0.87)]Hello everyone,
    I have an issue with Stata and I would be grateful for your support. [/COLOR]
    [COLOR=rgba(0, 0, 0, 0.87)]I'm working with an unbalanced penal data and use the "random effect logit model".
    By that I mean, I'm using the following command:
    xtlogit dep_var indep_var, re vce(bootstrap, rep(50) bca)

    My issue is that with the vce(bootstrap) command, Stata needs forever to give me some output. Is there maybe another way to get clusteres standard errors for this -xtlogit, re command.


    Thank you in advance.

    Best regards,
    Yasemin [/COLOR]

  • #2
    Yasemin:
    welcome to this forum.
    Why not using -cluster- option instead of -bootstrap- (by the way, the -bca- option is computationally demanding)?
    Code:
    . use http://www.stata-press.com/data/r16/union.dta
    (NLS Women 14-24 in 1968)
    
    . xtlogit union age, re vce(cluster idcode)
    
    Fitting comparison model:
    
    Iteration 0:   log pseudolikelihood =  -13864.23 
    Iteration 1:   log pseudolikelihood = -13851.221 
    Iteration 2:   log pseudolikelihood = -13851.215 
    Iteration 3:   log pseudolikelihood = -13851.215 
    
    Fitting full model:
    
    tau =  0.0     log pseudolikelihood = -13851.215
    tau =  0.1     log pseudolikelihood = -13197.615
    tau =  0.2     log pseudolikelihood =   -12662.4
    tau =  0.3     log pseudolikelihood = -12222.052
    tau =  0.4     log pseudolikelihood = -11854.374
    tau =  0.5     log pseudolikelihood = -11544.892
    tau =  0.6     log pseudolikelihood = -11287.102
    tau =  0.7     log pseudolikelihood =  -11084.53
    tau =  0.8     log pseudolikelihood = -10962.113
    
    Iteration 0:   log pseudolikelihood = -11084.335 
    Iteration 1:   log pseudolikelihood = -10669.142 
    Iteration 2:   log pseudolikelihood = -10643.955 
    Iteration 3:   log pseudolikelihood =  -10643.16 
    Iteration 4:   log pseudolikelihood =  -10643.16  (backed up)
    Iteration 5:   log pseudolikelihood = -10643.155 
    Iteration 6:   log pseudolikelihood = -10643.155 
    
    Calculating robust standard errors:
    
    Random-effects logistic regression              Number of obs     =     26,200
    Group variable: idcode                          Number of groups  =      4,434
    
    Random effects u_i ~ Gaussian                   Obs per group:
                                                                  min =          1
                                                                  avg =        5.9
                                                                  max =         12
    
    Integration method: mvaghermite                 Integration pts.  =         12
    
                                                    Wald chi2(1)      =      13.69
    Log pseudolikelihood  = -10643.155              Prob > chi2       =     0.0002
    
                                 (Std. Err. adjusted for 4,434 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
           union |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .0192923    .005214     3.70   0.000      .009073    .0295115
           _cons |  -3.007968   .1691338   -17.78   0.000    -3.339464   -2.676472
    -------------+----------------------------------------------------------------
        /lnsig2u |    1.81453   .0492249                      1.718051    1.911009
    -------------+----------------------------------------------------------------
         sigma_u |   2.477538   .0609783                      2.360859    2.599983
             rho |   .6510557    .011183                      .6288307    .6726427
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X