Announcement

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

  • Covariate is collinear with time variable in CPHM

    Hello,

    when running my CPHM, I get missing standard errors for one particular covariate. The covariate describes the generation in control of a company, and is built by dividing the age of the company by 25.
    The companies I am looking at are all left truncated, given that they were theoretically at risk of experiencing the event since the founding. To account for that, I used the age as the survival time - now age (time variable) and generation are obviously heavily correlated.

    How do I deal with that? Is there any other way then excluding this covariate?

    Here is an example of my data and the -stset- I used:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str17 bvd_id float(exit age origin gen_control) int(_t _t0)
    "DE11797" 0  8 0 1  .  .
    "DE11797" 0  9 0 1  9  8
    "DE11797" 0 10 0 1 10  9
    "DE11797" 0 11 0 1 11 10
    "DE11797" 0 12 0 1 12 11
    "DE11797" 0 13 0 1 13 12
    "DE11797" 0 14 0 1 14 13
    "DE11797" 0 15 0 1 15 14
    "DE11797" 0 16 0 1 16 15
    "DE11797" 0 17 0 1 17 16
    "DE14088" 0 58 0 3  .  .
    "DE14088" 0 59 0 3 59 58
    "DE14088" 0 60 0 3 60 59
    "DE14088" 0 61 0 3 61 60
    "DE14088" 0 62 0 3 62 61
    "DE14088" 0 63 0 3 63 62
    "DE14088" 0 64 0 3 64 63
    "DE14088" 0 65 0 3 65 64
    "DE14088" 0 66 0 3 66 65
    "DE14088" 0 67 0 3 67 66
    end
    Code:
    stset age, id(bvd_id) failure(exit==1) enter(age) origin(origin)
    I appreciate any help.


  • #2
    Your question will probably answer itself if you try to include the collinear variable in an stcox statement.
    Last edited by Steve Samuels; 03 Oct 2018, 16:35.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      To answer your question directly: you'll have to exclude the collinear variable. Here's what will happen if it's in the Cox model, assuming that the model converges.
      Code:
      . sysuse auto, clear
      (1978 Automobile Data)
      
      . stset mpg , fail(foreign)
                                       
      . gen new = mpg/2
      
      . stcox gear new
      
               failure _d:  foreign
         analysis time _t:  mpg
      
      [iteration table omitted]]
      
      Cox regression -- Breslow method for ties
      
      No. of subjects =           74                  Number of obs    =          74
      No. of failures =           22
      Time at risk    =         1576
                                                      LR chi2(0)       =       80.69
      Log likelihood  =   -22.814938                  Prob > chi2      =           .
      
      ------------------------------------------------------------------------------
                _t | Haz. Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
        gear_ratio |   28.62453          .        .       .            .           .
               new |   .0066014          .        .       .            .           .
      ------------------------------------------------------------------------------
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment

      Working...
      X