0
$\begingroup$

I have a Cox model with time dependent variables as follows, where ibd is a categorical variable with 3 levels. However, I am not sure why there is a NA for regression coefficient in the last level of "ibd". When I reorder the levels, it is still the third level that is NA.

Call:
coxph(formula = Surv(adm_start, adm_end, adm_outcome == 1) ~ 
    adm + ibd + MontrealA + decade + prevadm, data = adm_cox, 
    cluster = ID)

  n= ..., number of events= 169 

                 coef exp(coef)  se(coef) robust se      z Pr(>|z|)    
adm1         2.492000 12.085419  0.732874  0.744455  3.347 0.000816 ***
ibdnon-IBD  -1.500172  0.223092  0.180067  0.185680 -8.079 6.51e-16 ***
ibdIBD             NA        NA  0.000000  0.000000     NA       NA    
MontrealAA2 -0.359413  0.698086  0.231540  0.239495 -1.501 0.133430    
MontrealAA3 -0.545712  0.579429  0.269156  0.274694 -1.987 0.046965 *  
decade1980+ -0.816816  0.441836  0.198816  0.212263 -3.848 0.000119 ***
decade1990+ -1.136621  0.320901  0.223769  0.233220 -4.874 1.10e-06 ***
decade2000+ -1.724058  0.178341  0.300258  0.325774 -5.292 1.21e-07 ***
decade2010+ -1.997544  0.135668  0.545032  0.563526 -3.545 0.000393 ***
prevadm     0.067405  1.069728  0.003267  0.003433 19.636  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

On cross tabulation data is sparse on the first level for "ibd" predictor variable, but I still don't understand why the third level would be missing? Also, I am particularly interested in the coefficient of the third level, is there a way I could recode this variable so that it gives me a coefficient?

> table(adm_cox$ibd,adm_cox$adm_outcome,useNA="ifany")
         
               0      1      2
  None     14422     <3    269
  non-IBD 111869     57   4208
  IBD      47842    110    646
$\endgroup$

1 Answer 1

1
$\begingroup$

If you change the type of variable 'ibd' to numeric not as factor, then the output won't contain NA. And, only ibdIBD will shown (no ibdnon-IBD). Got the similar problem with a binary variable. Not sure if that's a bug from the print-codes. All the coefficients are correct and the model can call cox.zph as well.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.