Announcement

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

  • logit regression absorbing fixed ffects

    I have a dataset at the birth level with information on date of birth, hospital code and type of delivery, among other variables. The dataset comprises of several million births having taken place in ~1,000 different hospitals over 14 calendar years.

    I ran the OLS regression below of the dummy for c-section (d_pc) on the dummy for bank holiday (d_hol) controlling for time fixed effects (year, month, weekday) as well as hospital fixed effects (id_hosp), which I absorbed due to the large number of hospitals. I also clustered the stardard errors at the hospital level.

    Code:
    reg d_pc d_hol i.year i.month i.weekday, absorb(id_hosp) vce(cluster id_hosp)
    I would like to run an equivalent logit model. I tried using -clogit- as below but it did not work given the large number of hospitals. Below is the error message I got.
    Code:
    . clogit d_pc d_hol i.year i.month i.weekday, group(id_hosp) vce(cluster id_hosp)
    note: multiple positive outcomes within groups encountered.
    note: 86 groups (1,372 obs) dropped because of all positive or
          all negative outcomes.
    9,811 (group size) take 8,906 (# positives) combinations results in numeric overflow; computations cannot proceed
    r(1400);
    I do not know whether I could use -xtlogit- as this is not a panel data per se as each row corresponds to a different birth.

    Could anyone advice me on how to run a logit model while absorbing group fixed effects?

    Many thanks

  • #2
    Could anyone advice me on how to run a logit model while absorbing group fixed effects?
    You are not absorbing the fixed effects with conditional logit. You are conditioning them out of the likelihood.


    I do not know whether I could use -xtlogit- as this is not a panel data per se as each row corresponds to a different birth.

    xtlogit calls clogit, so they are the same command. A few things that I notice are that you include weekday, month and year dummies. As months are in years and days are in weeks, these sets of dummies will be collinear. So you need to include only the lowest level (days). If there are many observations within each hospital, you may include these as dummies - but I suspect that you will run into the numeric overflow problem. Stata MP allows a larger matrix, so that may be the only viable route at the end.

    Comment


    • #3
      Many thanks Andrew Musau!

      I am aware that conditional logit doesn't absorb the fixed effects. My goal is to be able to run a logit model in which I control for multiple fixed effects. As I don't care for the coefficient estimates of the dummy fixed effects and because Stata does not allow me to run the model while including all fixed effects, I was interested in knowing if there is a way I can absorb them. PS: I have Stata MP and still was not able to run the regression (i.e. see error message in the message I posted above).

      Would you have any recommendation of how I can go forward?

      PS: In my model, months refer to month alone (January, February, .... December) and weekday refers to day of the week (Monday, Tuesday, ... Sunday) - thus, it is ok to include year, month and day of the week fixed effects.
      In any case, I am mostly interested in being able to estimate the model while controling for the ~1,000 hospital dummies (ideally absorbing them as it is not feasible to estimate them all with Stata)

      Thanks again!

      Comment


      • #4
        As clogit cannot handle the size of your dataset, if you have many observations per hospital (say at least 50), then the other option is to estimate

        Code:
        logit d_pc d_hol i.year i.month i.weekday i. id_hosp

        Comment


        • #5
          Andrew says that -xtlogit- calls -clogit-, and looking at the code of -xtlogit- this appears to be true. So the below would probably not make a difference.

          But if you want to try -xtlogit-, do

          Code:
          xtset id_hosp
          and then -xtlogit-.

          Comment


          • #6
            Many thanks Andrew Musau and Joro Kolev.

            -clogit- and -xtlogit- do not work given the large number of hospitals.

            Code:
            . clogit d_pc d_hol i.year i.month i.weekday, group(id_hosp)
            note: multiple positive outcomes within groups encountered.
            note: 86 groups (1,372 obs) dropped because of all positive or
                  all negative outcomes.
            10,163 (group size) take 9,484 (# positives) combinations results in numeric overflow; computations cannot proceed
            r(1400);
            
            end of do-file
            
            r(1400);
            
            . do "C:\Users\paula\AppData\Local\Temp\STD43dc_000000.tmp"
            
            . xtset id_hosp
                   panel variable:  id_hosp (unbalanced)
            
            . xtlogit d_pc d_hol i.year i.month i.weekday, fe
            note: multiple positive outcomes within groups encountered.
            note: 86 groups (1,372 obs) dropped because of all positive or
                  all negative outcomes.
            10,163 (group size) take 9,484 (# positives) combinations results in numeric overflow; computations cannot proceed
            r(1400);
            
            end of do-file
            
            r(1400);
            
            .
            -logit- works but seems very inefficient given that I don't care about the hospital dummy coefficients. From your comments, I guess I have no other option, right?

            Code:
            . logit d_pc d_hol i.year i.month i.weekday i.id_hosp
            
            note: 749.id_hosp != 0 predicts success perfectly
                  749.id_hosp dropped and 10 obs not used
            
            note: 789.id_hosp != 0 predicts success perfectly
                  789.id_hosp dropped and 33 obs not used
            
            note: 1151.id_hosp != 0 predicts success perfectly
                  1151.id_hosp dropped and 12 obs not used
            
            note: 1292.id_hosp != 0 predicts failure perfectly
                  1292.id_hosp dropped and 1 obs not used
            
            note: 1321.id_hosp != 0 predicts success perfectly
                  1321.id_hosp dropped and 6 obs not used
            
            note: 1326.id_hosp != 0 predicts success perfectly
                  1326.id_hosp dropped and 2 obs not used
            
            note: 1339.id_hosp != 0 predicts success perfectly
                  1339.id_hosp dropped and 2 obs not used
            
            note: 1411.id_hosp != 0 predicts success perfectly
                  1411.id_hosp dropped and 26 obs not used
            
            note: 1418.id_hosp != 0 predicts success perfectly
                  1418.id_hosp dropped and 16 obs not used
            
            note: 1425.id_hosp != 0 predicts success perfectly
                  1425.id_hosp dropped and 6 obs not used
            
            note: 1436.id_hosp != 0 predicts success perfectly
                  1436.id_hosp dropped and 1 obs not used
            
            note: 1459.id_hosp != 0 predicts success perfectly
                  1459.id_hosp dropped and 7 obs not used
            
            note: 1489.id_hosp != 0 predicts success perfectly
                  1489.id_hosp dropped and 6 obs not used
            
            note: 1767.id_hosp != 0 predicts success perfectly
                  1767.id_hosp dropped and 4 obs not used
            
            note: 1794.id_hosp != 0 predicts success perfectly
                  1794.id_hosp dropped and 1 obs not used
            
            note: 2646.id_hosp != 0 predicts success perfectly
                  2646.id_hosp dropped and 1 obs not used
            
            note: 2674.id_hosp != 0 predicts success perfectly
                  2674.id_hosp dropped and 3 obs not used
            
            note: 2737.id_hosp != 0 predicts success perfectly
                  2737.id_hosp dropped and 1 obs not used
            
            note: 3411.id_hosp != 0 predicts success perfectly
                  3411.id_hosp dropped and 7 obs not used
            
            note: 4461.id_hosp != 0 predicts failure perfectly
                  4461.id_hosp dropped and 135 obs not used
            
            note: 4529.id_hosp != 0 predicts success perfectly
                  4529.id_hosp dropped and 10 obs not used
            
            note: 4805.id_hosp != 0 predicts success perfectly
                  4805.id_hosp dropped and 21 obs not used
            
            note: 4819.id_hosp != 0 predicts success perfectly
                  4819.id_hosp dropped and 44 obs not used
            
            note: 5138.id_hosp != 0 predicts success perfectly
                  5138.id_hosp dropped and 2 obs not used
            
            note: 5512.id_hosp != 0 predicts success perfectly
                  5512.id_hosp dropped and 1 obs not used
            
            note: 5993.id_hosp != 0 predicts success perfectly
                  5993.id_hosp dropped and 1 obs not used
            
            note: 5994.id_hosp != 0 predicts success perfectly
                  5994.id_hosp dropped and 241 obs not used
            
            note: 5998.id_hosp != 0 predicts success perfectly
                  5998.id_hosp dropped and 40 obs not used
            
            note: 6024.id_hosp != 0 predicts success perfectly
                  6024.id_hosp dropped and 7 obs not used
            
            note: 6029.id_hosp != 0 predicts success perfectly
                  6029.id_hosp dropped and 1 obs not used
            
            note: 6041.id_hosp != 0 predicts success perfectly
                  6041.id_hosp dropped and 29 obs not used
            
            note: 6314.id_hosp != 0 predicts success perfectly
                  6314.id_hosp dropped and 4 obs not used
            
            note: 7057.id_hosp != 0 predicts success perfectly
                  7057.id_hosp dropped and 4 obs not used
            
            note: 7095.id_hosp != 0 predicts success perfectly
                  7095.id_hosp dropped and 1 obs not used
            
            note: 7471.id_hosp != 0 predicts success perfectly
                  7471.id_hosp dropped and 1 obs not used
            
            note: 8010.id_hosp != 0 predicts success perfectly
                  8010.id_hosp dropped and 33 obs not used
            
            note: 8413.id_hosp != 0 predicts success perfectly
                  8413.id_hosp dropped and 1 obs not used
            
            note: 8626.id_hosp != 0 predicts success perfectly
                  8626.id_hosp dropped and 25 obs not used
            
            note: 8791.id_hosp != 0 predicts failure perfectly
                  8791.id_hosp dropped and 16 obs not used
            
            note: 8949.id_hosp != 0 predicts success perfectly
                  8949.id_hosp dropped and 14 obs not used
            
            note: 8994.id_hosp != 0 predicts success perfectly
                  8994.id_hosp dropped and 2 obs not used
            
            note: 9027.id_hosp != 0 predicts failure perfectly
                  9027.id_hosp dropped and 1 obs not used
            
            note: 9078.id_hosp != 0 predicts success perfectly
                  9078.id_hosp dropped and 1 obs not used
            
            note: 9079.id_hosp != 0 predicts success perfectly
                  9079.id_hosp dropped and 6 obs not used
            
            note: 9136.id_hosp != 0 predicts success perfectly
                  9136.id_hosp dropped and 2 obs not used
            
            note: 9172.id_hosp != 0 predicts failure perfectly
                  9172.id_hosp dropped and 1 obs not used
            
            note: 9180.id_hosp != 0 predicts success perfectly
                  9180.id_hosp dropped and 5 obs not used
            
            note: 9193.id_hosp != 0 predicts success perfectly
                  9193.id_hosp dropped and 8 obs not used
            
            note: 9210.id_hosp != 0 predicts success perfectly
                  9210.id_hosp dropped and 2 obs not used
            
            note: 9225.id_hosp != 0 predicts success perfectly
                  9225.id_hosp dropped and 4 obs not used
            
            note: 9235.id_hosp != 0 predicts success perfectly
                  9235.id_hosp dropped and 27 obs not used
            
            note: 9246.id_hosp != 0 predicts success perfectly
                  9246.id_hosp dropped and 74 obs not used
            
            note: 9261.id_hosp != 0 predicts failure perfectly
                  9261.id_hosp dropped and 16 obs not used
            
            note: 9274.id_hosp != 0 predicts success perfectly
                  9274.id_hosp dropped and 3 obs not used
            
            note: 9333.id_hosp != 0 predicts success perfectly
                  9333.id_hosp dropped and 1 obs not used
            
            note: 9342.id_hosp != 0 predicts success perfectly
                  9342.id_hosp dropped and 4 obs not used
            
            note: 9344.id_hosp != 0 predicts success perfectly
                  9344.id_hosp dropped and 3 obs not used
            
            note: 9595.id_hosp != 0 predicts success perfectly
                  9595.id_hosp dropped and 7 obs not used
            
            note: 9634.id_hosp != 0 predicts success perfectly
                  9634.id_hosp dropped and 2 obs not used
            
            note: 10178.id_hosp != 0 predicts success perfectly
                  10178.id_hosp dropped and 8 obs not used
            
            note: 10209.id_hosp != 0 predicts success perfectly
                  10209.id_hosp dropped and 9 obs not used
            
            note: 10239.id_hosp != 0 predicts success perfectly
                  10239.id_hosp dropped and 8 obs not used
            
            note: 10284.id_hosp != 0 predicts success perfectly
                  10284.id_hosp dropped and 3 obs not used
            
            note: 10363.id_hosp != 0 predicts success perfectly
                  10363.id_hosp dropped and 1 obs not used
            
            note: 10367.id_hosp != 0 predicts success perfectly
                  10367.id_hosp dropped and 9 obs not used
            
            note: 10371.id_hosp != 0 predicts success perfectly
                  10371.id_hosp dropped and 14 obs not used
            
            note: 10396.id_hosp != 0 predicts success perfectly
                  10396.id_hosp dropped and 5 obs not used
            
            note: 10445.id_hosp != 0 predicts success perfectly
                  10445.id_hosp dropped and 7 obs not used
            
            note: 10470.id_hosp != 0 predicts success perfectly
                  10470.id_hosp dropped and 3 obs not used
            
            note: 10473.id_hosp != 0 predicts success perfectly
                  10473.id_hosp dropped and 9 obs not used
            
            note: 10620.id_hosp != 0 predicts success perfectly
                  10620.id_hosp dropped and 14 obs not used
            
            note: 10622.id_hosp != 0 predicts success perfectly
                  10622.id_hosp dropped and 108 obs not used
            
            note: 10702.id_hosp != 0 predicts success perfectly
                  10702.id_hosp dropped and 3 obs not used
            
            note: 10766.id_hosp != 0 predicts success perfectly
                  10766.id_hosp dropped and 10 obs not used
            
            note: 11066.id_hosp != 0 predicts success perfectly
                  11066.id_hosp dropped and 5 obs not used
            
            note: 11092.id_hosp != 0 predicts success perfectly
                  11092.id_hosp dropped and 3 obs not used
            
            note: 11328.id_hosp != 0 predicts failure perfectly
                  11328.id_hosp dropped and 1 obs not used
            
            note: 11332.id_hosp != 0 predicts failure perfectly
                  11332.id_hosp dropped and 6 obs not used
            
            note: 11426.id_hosp != 0 predicts success perfectly
                  11426.id_hosp dropped and 5 obs not used
            
            note: 11487.id_hosp != 0 predicts success perfectly
                  11487.id_hosp dropped and 27 obs not used
            
            note: 11501.id_hosp != 0 predicts success perfectly
                  11501.id_hosp dropped and 1 obs not used
            
            note: 11504.id_hosp != 0 predicts success perfectly
                  11504.id_hosp dropped and 77 obs not used
            
            note: 11586.id_hosp != 0 predicts success perfectly
                  11586.id_hosp dropped and 5 obs not used
            
            note: 11623.id_hosp != 0 predicts success perfectly
                  11623.id_hosp dropped and 43 obs not used
            
            note: 12037.id_hosp != 0 predicts success perfectly
                  12037.id_hosp dropped and 4 obs not used
            
            note: 12160.id_hosp != 0 predicts success perfectly
                  12160.id_hosp dropped and 39 obs not used
            
            Iteration 0:   log likelihood =  -667620.6  
            Iteration 1:   log likelihood = -608881.63  
            Iteration 2:   log likelihood = -598348.59  
            Iteration 3:   log likelihood = -598023.51  
            Iteration 4:   log likelihood = -598013.86  
            Iteration 5:   log likelihood = -598008.28  
            Iteration 6:   log likelihood = -598008.24  
            Iteration 7:   log likelihood = -598008.24  
            
            Logistic regression                             Number of obs     =  1,585,048
                                                            LR chi2(811)      =  139224.71
                                                            Prob > chi2       =     0.0000
            Log likelihood = -598008.24                     Pseudo R2         =     0.1043
            
            ------------------------------------------------------------------------------
                    d_pc |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                   d_hol |  -.1238542   .0258036    -4.80   0.000    -.1744283     -.07328
                         |
                    year |
                   2007  |   .0629948   .0197972     3.18   0.001      .024193    .1017967
                   2008  |   .0241893   .0193655     1.25   0.212    -.0137664    .0621449
                   2009  |   .0343011   .0192082     1.79   0.074    -.0033463    .0719486
                   2010  |   .1833617   .0190269     9.64   0.000     .1460696    .2206538
                   2011  |    .229111   .0183719    12.47   0.000     .1931027    .2651192
                   2012  |   .2595279   .0177649    14.61   0.000     .2247093    .2943464
                   2013  |   .2702904    .017659    15.31   0.000     .2356794    .3049013
                   2014  |   .1908104   .0175094    10.90   0.000     .1564926    .2251282
                   2015  |  -.0561694   .0173002    -3.25   0.001    -.0900771   -.0222617
                   2016  |  -.0459171   .0175546    -2.62   0.009    -.0803234   -.0115108
                   2017  |  -.0513048   .0173643    -2.95   0.003    -.0853382   -.0172714
                   2018  |  -.0649837    .017379    -3.74   0.000    -.0990458   -.0309215
                   2019  |  -.0508228   .0176636    -2.88   0.004    -.0854428   -.0162028
                         |
                   month |
                      2  |  -.0280777   .0116162    -2.42   0.016    -.0508451   -.0053104
                      3  |  -.0020992   .0113306    -0.19   0.853    -.0243068    .0201084
                      4  |  -.0274121   .0114612    -2.39   0.017    -.0498756   -.0049486
                      5  |  -.0188333   .0113845    -1.65   0.098    -.0411466      .00348
                      6  |  -.0237337   .0115172    -2.06   0.039     -.046307   -.0011604
                      7  |  -.0236274   .0114905    -2.06   0.040    -.0461483   -.0011065
                      8  |  -.0197022   .0115831    -1.70   0.089    -.0424046    .0030003
                      9  |   -.021721   .0115309    -1.88   0.060    -.0443212    .0008791
                     10  |   .0219509   .0116954     1.88   0.061    -.0009715    .0448734
                     11  |  -.0142945    .011706    -1.22   0.222    -.0372379    .0086489
                     12  |   .0054226   .0115614     0.47   0.639    -.0172374    .0280825
                         |
                 weekday |
                    Mon  |   .6566597   .0091247    71.97   0.000     .6387756    .6745438
                    Tue  |   .6132953   .0091802    66.81   0.000     .5953025    .6312881
                    Wed  |   .6241835   .0091968    67.87   0.000     .6061581     .642209
                    Thu  |   .5905933   .0091904    64.26   0.000     .5725805    .6086062
                    Fri  |   .5918517   .0093095    63.58   0.000     .5736055     .610098
                    Sat  |    .308055   .0094646    32.55   0.000     .2895047    .3266054
                         |
                 id_hosp |
                    177  |  -.8834312   .0993284    -8.89   0.000    -1.078111   -.6887511
                    184  |  -.3454638   .0532151    -6.49   0.000    -.4497635   -.2411641
                    189  |  -1.084048   .0435779   -24.88   0.000    -1.169459   -.9986366
                    194  |    -.92577   .6411533    -1.44   0.149    -2.182407    .3308674
                    263  |   -2.61546   .1345733   -19.44   0.000    -2.879219   -2.351701
                    270  |   -.701618   .7624748    -0.92   0.357    -2.196041    .7928053
                    316  |  -.7972923    .064841   -12.30   0.000    -.9243784   -.6702063
                    431  |   .4303928   .1687642     2.55   0.011     .0996211    .7611645
                    433  |  -.7743769   .0658007   -11.77   0.000    -.9033438     -.64541
                    434  |   .9811979   .5088168     1.93   0.054    -.0160646     1.97846
                    449  |  -2.958744    .348967    -8.48   0.000    -3.642707   -2.274782
                    453  |   -1.23737   .5658791    -2.19   0.029    -2.346472   -.1282669
                    455  |  -1.420057   .0423718   -33.51   0.000    -1.503104    -1.33701
                    457  |   -1.74464   .0428086   -40.75   0.000    -1.828543   -1.660737
                    459  |   -1.55766   .0488247   -31.90   0.000    -1.653355   -1.461965
                    461  |  -1.336201   .0667241   -20.03   0.000    -1.466977   -1.205424
                    531  |    .445176   .2593083     1.72   0.086     -.063059     .953411
                    537  |    .057504   .0772958     0.74   0.457     -.093993    .2090009
                    540  |  -.9263454   .0552735   -16.76   0.000    -1.034679   -.8180114
                    613  |  -.4781573    .196695    -2.43   0.015    -.8636724   -.0926422
                    653  |  -1.008878   .0578289   -17.45   0.000     -1.12222   -.8955353
                    667  |  -1.047735   .0437591   -23.94   0.000    -1.133502    -.961969
                    673  |  -1.358087   .0466309   -29.12   0.000    -1.449482   -1.266692
                    674  |  -.5882563   .0603835    -9.74   0.000    -.7066058   -.4699069
                    682  |    .291795   .0582215     5.01   0.000      .177683    .4059071
                    739  |  -.9650411   .1803877    -5.35   0.000    -1.318594   -.6114877
                    740  |  -.3652403   .0716754    -5.10   0.000    -.5057215   -.2247591
                    744  |  -.1647989   .3329501    -0.49   0.621     -.817369    .4877713
                    749  |          0  (empty)
                    755  |  -1.030818   .0681931   -15.12   0.000    -1.164474   -.8971621
                    773  |  -1.563832   .0748153   -20.90   0.000    -1.710468   -1.417197
                    786  |  -1.199292   .0505928   -23.70   0.000    -1.298452   -1.100132
                    788  |   -.687755   .2427422    -2.83   0.005    -1.163521   -.2119889
                    789  |          0  (empty)
                    952  |  -2.054624   .0587187   -34.99   0.000     -2.16971   -1.939537
                    958  |   1.250256   1.009887     1.24   0.216    -.7290873    3.229599
                    996  |   -1.56549   .1745663    -8.97   0.000    -1.907634   -1.223347
                    998  |  -2.056954   .0495864   -41.48   0.000    -2.154141   -1.959766
                   1038  |  -1.947553   .6026693    -3.23   0.001    -3.128764   -.7663433
                   1104  |  -1.966138   .3058908    -6.43   0.000    -2.565673   -1.366603
                   1124  |  -.1926043   .4290509    -0.45   0.653    -1.033529      .64832
                   1127  |  -2.547321   .0456083   -55.85   0.000    -2.636711    -2.45793
                   1129  |  -.8503001   .0555629   -15.30   0.000    -.9592013   -.7413988
                   1134  |   1.100281   .1757812     6.26   0.000     .7557561    1.444806
                   1136  |  -2.461694   .0463637   -53.10   0.000    -2.552565   -2.370823
                   1138  |  -1.342017    .804276    -1.67   0.095    -2.918369    .2343346
                   1139  |  -1.408286   .0892929   -15.77   0.000    -1.583297   -1.233275
                   1146  |  -.6224763   .1011006    -6.16   0.000    -.8206298   -.4243229
                   1147  |  -.9788687   .0801392   -12.21   0.000    -1.135939   -.8217987
                   1148  |  -.8993124    .111899    -8.04   0.000     -1.11863   -.6799945
                   1151  |          0  (empty)
                   1162  |  -1.600353   .0472431   -33.87   0.000    -1.692948   -1.507758
                   1163  |  -.7027152   .0550184   -12.77   0.000    -.8105494   -.5948811
                   1165  |  -1.060796   .0931122   -11.39   0.000    -1.243293   -.8782995
                   1167  |  -.4038077   .0595313    -6.78   0.000    -.5204869   -.2871284
                   1168  |   .5385194    .342634     1.57   0.116     -.133031     1.21007
                   1170  |  -.3922354   .3325499    -1.18   0.238    -1.044021    .2595505
                   1172  |  -1.862838   .0582061   -32.00   0.000     -1.97692   -1.748756
                   1173  |  -1.225766   .0483409   -25.36   0.000    -1.320512   -1.131019
                   1174  |  -1.916552   .0519302   -36.91   0.000    -2.018333   -1.814771
                   1175  |  -2.218294   .0493389   -44.96   0.000    -2.314996   -2.121591
                   1177  |  -1.078784   .0501628   -21.51   0.000    -1.177101   -.9804667
                   1180  |  -.9649359   .1359932    -7.10   0.000    -1.231478   -.6983941
                   1181  |   .4500814    .126329     3.56   0.000     .2024811    .6976817
                   1185  |  -.9823293   .0781028   -12.58   0.000    -1.135408   -.8292507
                   1186  |   .0442544   .2528712     0.18   0.861    -.4513641    .5398728
                   1216  |  -.6519734   .6187345    -1.05   0.292    -1.864671     .560724
                   1220  |  -.5277711   .0435582   -12.12   0.000    -.6131435   -.4423986
                   1223  |  -1.594204   .5298993    -3.01   0.003    -2.632787   -.5556202
                   1225  |  -.5872256   .0645219    -9.10   0.000    -.7136862    -.460765
                   1227  |  -.2620193   .7443842    -0.35   0.725    -1.720986    1.196947
                   1230  |  -.7279041    .406444    -1.79   0.073     -1.52452    .0687116
                   1240  |  -1.515716   .0512658   -29.57   0.000    -1.616196   -1.415237
                   1247  |  -1.800224   .0539187   -33.39   0.000    -1.905903   -1.694545
                   1256  |  -1.061608   .0634953   -16.72   0.000    -1.186057   -.9371598
                   1258  |   1.201548   .4537028     2.65   0.008     .3123063    2.090789
                   1260  |  -1.118044   .0687357   -16.27   0.000    -1.252763   -.9833242
                   1266  |   -.548078   .1051423    -5.21   0.000     -.754153   -.3420029
                   1279  |   .8277158   .4571105     1.81   0.070    -.0682043    1.723636
                   1291  |  -.4558528   .1310911    -3.48   0.001    -.7127867   -.1989189
                   1292  |          0  (empty)
                   1296  |  -1.003147   .0842456   -11.91   0.000    -1.168266   -.8380292
                   1298  |  -.3946117   .0725657    -5.44   0.000    -.5368379   -.2523855
                   1299  |  -.9006755   .1143809    -7.87   0.000    -1.124858   -.6764931
                   1301  |  -1.988238   .1263687   -15.73   0.000    -2.235916    -1.74056
                   1303  |  -1.583067   .0629415   -25.15   0.000     -1.70643   -1.459704
                   1312  |   -.896627   .1829671    -4.90   0.000    -1.255236   -.5380181
                   1313  |  -.2074857   .1241922    -1.67   0.095    -.4508978    .0359265
                   1314  |  -.8532067   .0942675    -9.05   0.000    -1.037968   -.6684457
                   1316  |  -1.424191   .0548175   -25.98   0.000    -1.531631   -1.316751
                   1320  |  -.4161965    .203353    -2.05   0.041    -.8147611   -.0176319
                   1321  |          0  (empty)
                   1323  |    .629898   .2757395     2.28   0.022     .0894584    1.170338
                   1326  |          0  (empty)
                   1339  |          0  (empty)
                   1353  |  -.5023634   .1043609    -4.81   0.000    -.7069069   -.2978199
                   1354  |  -1.403346   .0455659   -30.80   0.000    -1.492653   -1.314038
                   1372  |  -.8562881   .0826239   -10.36   0.000    -1.018228   -.6943483
                   1375  |  -.1151647   .0879968    -1.31   0.191    -.2876353    .0573058
                   1376  |  -.2774763   .2057169    -1.35   0.177     -.680674    .1257214
                   1379  |  -1.036491    .082912   -12.50   0.000    -1.198996   -.8739866
                   1384  |  -2.365206    .056631   -41.77   0.000    -2.476201   -2.254211
                   1394  |  -.6836463   .0767698    -8.91   0.000    -.8341123   -.5331803
                   1396  |  -.2435566   .1296061    -1.88   0.060    -.4975799    .0104667
                   1401  |  -1.245979   .1673149    -7.45   0.000    -1.573911   -.9180484
                   1411  |          0  (empty)
                   1418  |          0  (empty)
                   1423  |  -1.091759   .1014133   -10.77   0.000    -1.290526    -.892993
                   1425  |          0  (empty)
                   1436  |          0  (empty)
                   1439  |  -1.815199   .2087075    -8.70   0.000    -2.224258    -1.40614
                   1442  |  -1.826538   .0568553   -32.13   0.000    -1.937972   -1.715104
                   1448  |  -1.502488   .1449544   -10.37   0.000    -1.786593   -1.218383
                   1452  |  -.3716549    .063758    -5.83   0.000    -.4966182   -.2466916
                   1453  |  -2.714367   .8250424    -3.29   0.001    -4.331421   -1.097314
                   1456  |   -2.15205   .0679773   -31.66   0.000    -2.285283   -2.018817
                   1459  |          0  (empty)
                   1472  |  -1.830349   .0859684   -21.29   0.000    -1.998844   -1.661853
                   1475  |  -.4950714   .0999683    -4.95   0.000    -.6910057   -.2991371
                   1477  |   .2832298   .4221034     0.67   0.502    -.5440776    1.110537
                   1481  |  -.0343685   .4238637    -0.08   0.935    -.8651261     .796389
                   1484  |  -.2189997   .2129023    -1.03   0.304    -.6362806    .1982811
                   1486  |  -1.885171   .0443502   -42.51   0.000    -1.972096   -1.798246
                   1489  |          0  (empty)
                   1498  |   .3825586   .7241755     0.53   0.597    -1.036799    1.801916
                   1557  |    -2.0449   .1290383   -15.85   0.000     -2.29781   -1.791989
                   1558  |  -.6607105   .0994307    -6.64   0.000    -.8555912   -.4658299
                   1560  |  -1.524027   .1384903   -11.00   0.000    -1.795463   -1.252591
                   1561  |  -1.160208   .0463389   -25.04   0.000    -1.251031   -1.069386
                   1562  |   .1674391   .4627153     0.36   0.717    -.7394661    1.074344
                   1564  |  -1.466147   .5079389    -2.89   0.004    -2.461689   -.4706056
                   1565  |  -.9854506   .0490971   -20.07   0.000    -1.081679   -.8892222
                   1619  |   .5486691   .4188924     1.31   0.190    -.2723449    1.369683
                   1632  |   .2929911    .165495     1.77   0.077    -.0313732    .6173553
                   1765  |  -.3120347   .0952043    -3.28   0.001    -.4986317   -.1254376
                   1766  |   .0171501   .3016602     0.06   0.955    -.5740931    .6083933
                   1767  |          0  (empty)
                   1787  |  -1.302626   .0436718   -29.83   0.000    -1.388221   -1.217031
                   1794  |          0  (empty)
                   1818  |  -1.891834   1.228222    -1.54   0.123    -4.299105     .515437
                   1819  |  -.9901599   .1079034    -9.18   0.000    -1.201647   -.7786732
                   1825  |   .2002334   .1554732     1.29   0.198    -.1044884    .5049552
                   1858  |   .1137883   .1867418     0.61   0.542    -.2522189    .4797956
                   1889  |  -2.139529   .0453616   -47.17   0.000    -2.228436   -2.050622
                   1921  |   .8047145   .7191079     1.12   0.263     -.604711     2.21414
                   1953  |   -1.13609   .0598692   -18.98   0.000    -1.253431   -1.018748
                   1979  |  -1.182595   .7943964    -1.49   0.137    -2.739583    .3743936
                   2033  |   .8866185   .2842026     3.12   0.002     .3295916    1.443645
                   2070  |   .6097913   .1063414     5.73   0.000      .401366    .8182166
                   2072  |   .3986925   .2381658     1.67   0.094    -.0681038    .8654889
                   2074  |   .6393971   .1818039     3.52   0.000      .283068    .9957262
                   2075  |   .2925968   .0813622     3.60   0.000     .1331297    .4520638
                   2079  |   .7704362   1.015453     0.76   0.448    -1.219815    2.760687
                   2094  |   .6033607   .7217012     0.84   0.403    -.8111476    2.017869
                   2116  |  -.8166303   .0811699   -10.06   0.000    -.9757203   -.6575403
                   2117  |   .8290435   .2308452     3.59   0.000     .3765951    1.281492
                   2157  |  -1.129033   .1714698    -6.58   0.000    -1.465107   -.7929582
                   2254  |   -2.03817   .6311258    -3.23   0.001    -3.275154    -.801186
                   2309  |  -.5721956   .1620302    -3.53   0.000    -.8897689   -.2546223
                   2403  |  -.1875956   .1622316    -1.16   0.248    -.5055636    .1303725
                   2449  |   .1491549   .1894671     0.79   0.431    -.2221938    .5205035
                   2459  |  -.0258739   .1681634    -0.15   0.878    -.3554681    .3037204
                   2460  |  -.3439512   .2112498    -1.63   0.103    -.7579932    .0700909
            
            etc
            .

            Comment


            • #7
              No, I do not think that you have any other options. And what does it mean inefficient? You managed to fit the -logit- model, and the -logit- model is appropriate here for the reasons that Andrew alluded to (that you have many observations per hospital). It seems that everything looks great.

              If for reporting purposes you are annoyed that you get too many estimated parameters, fit the logit model quietly, and then use the user contributed -esttab- to display your results. -esttab- has keep and drop options, so you can control which estimates it includes in the table and which it drops.

              Comment


              • #8
                Awesome, many thanks Joro Kolev!

                Comment


                • #9
                  I am trying to run a mixed logit model for a data set with 6 choice sets,3 alternatives and 5 attributes.I have tried the mixlogit command but i keep getting some error messages

                  cmmixlogit Choice, casevars(landsz Inclevels) random(NutritionlevelModerate)
                  note: 138 cases (2484 obs) dropped due to no positive outcome, multiple positive outcomes, or a single
                  observation per case
                  variable Alternative has replicate levels for one or more cases; this is not allowed

                  Kindly advice

                  Comment


                  • #10
                    David:
                    welcome to this forum.
                    Please start a new thread, as your query has a very tenous relationship with this one. Thanks.
                    Kind regards,
                    Carlo
                    (StataNow 18.5)

                    Comment


                    • #11
                      I have met similar problems when running xtmogit. Due to a large number of school fixed effects, neighborhood fixed effects, I could not get the regression results because it is always showing that "fitting comparison model..." Is there any alternative method I could use ?

                      Many thanks

                      Comment


                      • #12
                        Qiuyi:
                        the usual recipe is to start with a more parsimonious model, progressively increasing its complexity and check when problems come alive.
                        Kind regards,
                        Carlo
                        (StataNow 18.5)

                        Comment

                        Working...
                        X