[R] Creating survival object

Jens Schmidt jens.schmidt at mailbox.tu-dresden.de
Sun Oct 5 20:16:26 CEST 2003


Hi,

I have survival data from a population:

time    alive       treatment
0       20          A
3       12          A
5       10          A
8       7           A
10      7           A
15      5           A
20      5           A


(time=0 is start of the experiment and initial number of individuals is
alive=20; time=20 is end of experiment)

If I don't misunderstood the survival documentation, always a survival
object is required, i.e. created with function Surv(time, event)

So I have to transform my data (assuming no censoring, event=0 is alive
and event=1 is dead):

time    event   treatment
20      0       A
20      0       A
20      0       A
20      0       A
20      0       A
15      1       A
15      1       A
8       1       A
8       1       A
8       1       A
5       1       A
5       1       A
3       1       A
3       1       A
3       1       A
3       1       A
3       1       A
3       1       A
3       1       A
3       1       A


Is there a function or any other [R] code doing this?

or

Is it possible  to perform survival analysis direct from
population data set?

Thanks for any help
Jens

-- 
Jens Schmidt                    TU Dresden -Inst. f. Hydrobiologie-
Tel. +49-(0)351-463-36284       Mommsenstrasse 13
Fax  +49-(0)351-463-37108       01062 Dresden
                              	R.F.A.




More information about the R-help mailing list