[R] basehaz() in package 'Survival' and warnings() with coxph

hazbro ahmednasib at gmail.com
Thu Aug 9 00:03:45 CEST 2012


Hello,

I have a couple of questions with regards to fitting a coxph model to a data
set in R:

I have a very large dataset and wanted to get the baseline hazard using the
basehaz() function in the package : 'survival'.
If I use all the covariates then the output from basehaz(fit), where fit is
a model fit using coxph(), gives 507 unique values for the time and the
corresponding cumulative hazard function. However if I use a subset of the
varaibles, basehaz() gives 611 values for the time and cumulative hazard.

The latter makes more sense as out of my 73000 observations, there are 611
unique times. However I wish to use all the variables to get the baseline
hazard.

Also I get a couple of warnings when I fit the coxph() model:

1) In fitter(X, Y, strats, offset, init, control, weights = weights,  :
  Loglik converged before variable   ; beta may be infinite.

2)  X is deemed to be singular.

I am aware that the second one is because of multicollinearity and also none
of the  coefficients are infinite so I thought I could ignore these.
Removing the variables that causes these problems does not solve my problem
with the basehaz().

The only reason I can think of is that maybe the baseline hazard is
undefined at some time points.

Thanks for the help.





--
View this message in context: http://r.789695.n4.nabble.com/basehaz-in-package-Survival-and-warnings-with-coxph-tp4639687.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list