What you have is a slightly more subtle variant of the following:

   library(survival)
   data(lung)   
   mydata <- cbind(lung, newvar =2)
   coxph(Surv(time, status) ~ ph.karno + newvar,  mydata)

                coef exp(coef) se(coef)     z     p
    ph.karno -0.0164     0.984  0.00585 -2.81 0.005
    newvar        NA        NA  0.00000    NA    NA


 You have created a data set where at all times <13 the variable t=0, and at 
all 
times >13 the variable t=1.  The Cox model compares the values of the 
covariates 
of each subject who died to the values of those who did not die, using the 
current covariate values AT THAT TIME.  Since the value of your "t" is always a 
constant within the set, the variable contains no information for 
discriminating 
the events from the non-events.  Zero information --> a coefficient of NA.
 
        Terry Therneau   
        Mayo Clinic

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to