[R] Survival dummy variables and some questions

From: Stephen <szlevine_at_nana.co.il>
Date: Mon 18 Jul 2005 - 16:46:52 EST

Hi All,  

I am currently conducting some survival analyses. I would like to extract coefficients at each level of the IVs.

I read on a previous posting that dummy regression using coxph was not possible.

Therefore I though, hey why not categorize the variables

(I realize some folks object to categorization but the paper I am replicating appears to have done so ...)

and turn the variables into factors and then try the analysis.  


Dataset <- read.table("categ.dat", header=TRUE)

Dataset$eventbefore2c <- factor(Dataset$eventbefore)

.. other IVs here


surv.mod1 <- coxph(Surv(start, stop, event) ~ sex2 + ageonset2c + eventbefore2c + daysbefore2c, data=Dataset)  

Strangely enough, I receive a warning message when the variables are treated in this way: X matrix deemed to be singular; variable 11 in: coxph(Surv(start, stop, event) ~ sex2 + ageonset2c + eventbefore2c +  

I donít receive any warnings just treating the variables in their initial continuous format.

I am currently using version

platform i386-pc-mingw32

arch i386

os mingw32

system i386, mingw32


major 2

minor 1.1

year 2005

month 06

day 20

language R    

Is this approach to dummy variable using coxph erroneous?  

Is there another way to conduct dummy variable regression with coxph?  

Also, if I include frailty (id) does anyone know of a useful way to investigate frailty?  

If one were to plot recurrent events does anyone know of a way of interpreting them?  

References & code appreciated.  

BTW. not too familiar with R, less so with survival analysis .... but well worth the effort.  

Many thanks in advance...  



???? ?"? ???? ????

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jul 18 15:50:04 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:46 EST