Announcement

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

  • Cox model refuses to calculate SEs for year dummies!

    Dear Statalist,

    I am looking for help with my Cox regression (a survival analysis).

    My unit of analysis is countries, the dependent variable is the adoption of a certain law (of course binary), and the time variable is years passed since 1990 to adoption year. My observation starts in 1990 and ends in 2005, each country is observed once per year.

    My variables are time-varying ones (ln_ncbmn_cy ln_gdppercapita ln_population polity2 imfd igo_c_lltc5). On top of these time-varying variables, I included year dummies.

    When I run a Cox model with the year dummies, it does not calculate standard errors for the dummies(a result attached below). It calculates SEs for everything correct, but not for year dummies.

    Not only year dummies, but any variable that does not vary across countries within a year (for example, the number of countries that adopted the law in each year), it refuses to calculate SEs.

    I ask statlist members if you have any advice on my problem.

    Thanks,
    David

    Code:
    .         stcox   ln_ncbmn_cy  ln_gdppercapita ln_population  polity2     imfd            igo_c_ll
    > tc5     i.year                                          
    
             failure _d:  ta1 == 1
       analysis time _t:  year_1
                     id:  newid3
    
    Iteration 0:   log likelihood =   -422.719
    Iteration 1:   log likelihood =  -389.2535
    Iteration 2:   log likelihood = -387.77064
    Iteration 3:   log likelihood = -387.76954
    Iteration 4:   log likelihood = -387.76954  (backed up)
    Iteration 5:   log likelihood = -387.76954  (backed up)
    Iteration 6:   log likelihood = -387.76954  (backed up)
    Refining estimates:
    Iteration 0:   log likelihood = -387.76954
    
    Cox regression -- Breslow method for ties
    
    No. of subjects =          151                  Number of obs    =       1,255
    No. of failures =           93
    Time at risk    =         1255
                                                    LR chi2(6)       =       69.90
    Log likelihood  =   -387.76954                  Prob > chi2      =      0.0000
    
    ---------------------------------------------------------------------------------
                 _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
    ----------------+----------------------------------------------------------------
        ln_ncbmn_cy |    1.02704   .0235104     1.17   0.244     .9819788    1.074169
    ln_gdppercapita |   1.415395   .1743046     2.82   0.005     1.111868    1.801783
      ln_population |   1.249535   .1106441     2.52   0.012     1.050452    1.486349
            polity2 |   1.061197   .0209052     3.02   0.003     1.021004    1.102972
               imfd |   1.103042   .3321092     0.33   0.745     .6113757    1.990105
        igo_c_lltc5 |   1.022244   .5754177     0.04   0.969      .339169    3.081009
                    |
               year |
              1991  |   34.41589          .        .       .            .           .
              1992  |   16.68557          .        .       .            .           .
              1993  |   14.46724          .        .       .            .           .
              1994  |   148.7342          .        .       .            .           .
              1995  |   87.68588          .        .       .            .           .
              1996  |   17.66053          .        .       .            .           .
              1997  |   7.89e+07          .        .       .            .           .
              1998  |   2.790774          .        .       .            .           .
              1999  |    2.78696          .        .       .            .           .
              2000  |   23.96774          .        .       .            .           .
              2001  |   .9907272          .        .       .            .           .
              2002  |   2.790877          .        .       .            .           .
              2003  |   5.950447          .        .       .            .           .
              2004  |   12.60604          .        .       .            .           .
              2005  |   8.103457          .        .       .            .           .
    ---------------------------------------------------------------------------------
    
    . 
    end of do-file

  • #2
    Anyone?

    Comment


    • #3
      Hi David! I was wondering if you ever figured out an answer to your question.... I am experiencing similar issues right now but cannot find a relevant answer... Any ideas?

      Comment


      • #4
        Hi David,

        Can you show please your STATA output after -st- command?

        Best,
        Vardan

        Comment

        Working...
        X