Announcement

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

  • Logistic regression with few clusters (Boottest package -Error imposing null)

    Hello,
    I am analyzing individual level data from a cluster RCT. There are 24 clusters (12 intervention & 12 control clinics) and the number of patients recruited from each clinic is between 84 and 150. The total number of patients is 2796. In this secondary analysis I am not comparing between the study arms but pooling the clusters to look at factors associated with persistent clinical depression. My main outcome is a binary variable (persistent depression during one year follow up: Yes/No) Since the number of clusters are fewer than ideal, I am using the score bootstrap developed by Kline and Santos as an adaptation of the wild bootstrap. (Kline, P., and Santos, A. 2012. A score based approach to wild bootstrap inference. Journal of Econometric Methods 1(1): 23-41.).
    To implement this, I am using the boottest (ssc boottest) package developed by Roodman et al. (Roodman, D., J. MacKinnon, M. Nielsen, and M. Webb. 2018. Fast and wild: bootstrap inference in Stata using boottest. Queen's Economics Department Working Paper No. 1406 ) in Stata IC/14.2

    While running a multivariable model I am getting an error:



    Here is the command that I used

    Code:
     logit cisr_hi2 sex_b age_b edu_r1 _Iman_fina__3 ill_r1 marit3 , cluster (clinic_b) or //
    boottest {sex_b = 0} { age_b = 0} { edu_r1 = 0} {_Iman_fina__3 = 0 }{ill_r1 = 0} {marit3 = 0}

    after running the logistic regression and rerunning with the score bootstrap, null imposed, it runs fine for the first two independent variables. Here is the output for the logistic regression and the independent variable sex_b

    Code:
     logit cisr_hi2 sex_b age_b edu_r1 _Iman_fina__3 ill_r1 marit3 , cluster (clinic_b) or
    
    Iteration 0:   log pseudolikelihood = -918.72324  
    Iteration 1:   log pseudolikelihood = -874.81109  
    Iteration 2:   log pseudolikelihood =  -873.0685  
    Iteration 3:   log pseudolikelihood = -873.06434  
    Iteration 4:   log pseudolikelihood = -873.06434  
    
    Logistic regression                             Number of obs     =      2,122
                                                    Wald chi2(6)      =     120.78
                                                    Prob > chi2       =     0.0000
    Log pseudolikelihood = -873.06434               Pseudo R2         =     0.0497
    
                                   (Std. Err. adjusted for 24 clusters in clinic_b)
    -------------------------------------------------------------------------------
                  |               Robust
         cisr_hi2 | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
            sex_b |   .6541794   .1518481    -1.83   0.068     .4150649    1.031045
            age_b |   1.005826   .0083267     0.70   0.483     .9896371    1.022279
           edu_r1 |   .7372227    .108622    -2.07   0.039     .5523103    .9840435
    _Iman_fina__3 |    2.46528   .3796867     5.86   0.000     1.822928    3.333979
           ill_r1 |   1.630592   .2851891     2.80   0.005     1.157366     2.29731
           marit3 |   .8978088   .1216704    -0.80   0.426     .6883822    1.170949
            _cons |   .0806981   .0340102    -5.97   0.000     .0353285    .1843325
    -------------------------------------------------------------------------------
    
    .  boottest {sex_b = 0} { age_b = 0} { edu_r1 = 0} {_Iman_fina__3 = 0 }{ill_r1 = 0} {marit3 = 0}
    
    Re-running regression with null imposed.
    
    
    Iteration 0:   log likelihood = -918.72324  
    Iteration 1:   log likelihood = -876.92721  
    Iteration 2:   log likelihood = -875.38767  
    Iteration 3:   log likelihood = -875.38502  
    Iteration 4:   log likelihood = -875.38502  
    
    Logistic regression                             Number of obs     =      2,122
                                                    Wald chi2(5)      =      80.70
    Log likelihood = -875.38502                     Prob > chi2       =     0.0000
    
     ( 1)  [cisr_hi2]sex_b = 0
    -------------------------------------------------------------------------------
         cisr_hi2 | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
            sex_b |          1  (omitted)
            age_b |   1.003409   .0057257     0.60   0.551     .9922498    1.014694
           edu_r1 |   .7059302   .1047639    -2.35   0.019     .5277628     .944245
    _Iman_fina__3 |   2.463688   .3145025     7.06   0.000     1.918339    3.164069
           ill_r1 |   1.644292   .2119911     3.86   0.000     1.277137    2.116999
           marit3 |   .9717333   .1368774    -0.20   0.839     .7373058    1.280697
            _cons |   .0844367   .0253467    -8.23   0.000     .0468827    .1520724
    -------------------------------------------------------------------------------
    
    Score bootstrap, null imposed, 999 replications, Wald test, clustering by cluster(clinic_b), bootstrap clustering by clinic_b, Radema
    > cher weights:
      sex_b = 0
    
                                               z =    -2.4064
                                        Prob>|z| =     0.0320

    But once it reaches the third variable I am getting the following error:


    Code:
    Re-running regression with null imposed.
    
    
    Iteration 0:   log likelihood = -918.72324  
    Iteration 1:   log likelihood = -876.75676  
    Iteration 2:   log likelihood = -875.17568  
    Iteration 3:   log likelihood = -875.17242  
    Iteration 4:   log likelihood = -875.17242  
    
    Logistic regression                             Number of obs     =      2,122
                                                    Wald chi2(5)      =      80.88
    Log likelihood = -875.17242                     Prob > chi2       =     0.0000
    
     ( 1)  [cisr_hi2]edu_r1 = 0
    -------------------------------------------------------------------------------
         cisr_hi2 | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
            sex_b |   .6201915   .1251833    -2.37   0.018     .4175553    .9211655
            age_b |   1.010337   .0054863     1.89   0.058     .9996412    1.021147
           edu_r1 |          1  (omitted)
    _Iman_fina__3 |   2.558244   .3235625     7.43   0.000     1.996564    3.277936
           ill_r1 |   1.591771   .2046632     3.62   0.000     1.237191    2.047975
           marit3 |   .9076537   .1320017    -0.67   0.505     .6825405    1.207013
            _cons |   .0588529   .0154306   -10.80   0.000      .035204    .0983885
    -------------------------------------------------------------------------------
    
    Score bootstrap, null imposed, 999 replications, Wald test, clustering by cluster(clinic_b), bootstrap clustering by clinic_b, Radema
    > cher weights:
      edu_r1 = 0
    
                                               z =    -1.9053
                                        Prob>|z| =     0.0791
    
    Re-running regression with null imposed.
    
    
                _cns_eigen():  3301  subscript invalid
             opt__validate():     -  function returned error
            mopt__validate():     -  function returned error
                _moptimize():     -  function returned error
               Mopt_maxmin():     -  function returned error
                     <istmt>:     -  function returned error
    Error imposing null. Perhaps logit does not accept the constraints(), from(), and iterate() options, as needed.
    r(3301);

    I would really appreciate any thoughts on what is causing this error.

    OR any other suggestions for analysis of binary outcome variable in a data with few clusters (24 clusters & The ICC for my outcome variable is about 0.082)

    Thank you
Working...
X