[R] Calculating survival for set time intervals

Gregory Pierce pierce.gregory at gmail.com
Sat Jun 10 20:52:41 CEST 2006


Hello friends and fellow R users,

I have successfully tabulated and entered my survival data into R and
have generated survival curves. But I would like to be able to determine
what the survival rates are now at one month, three months, six months
and one year.

I have a data set, via.wall, which I have entered into R, and which
generates the following Surv object:

Surv(Days,Status==1)
  [1] 648+   3  109  241   99    7  849+ 105    3+ 539+ 121   42  490
21  870+
 [16] 175   20  434  289  826+ 831+ 664  698+   5   24  655+  18    7+
85+  65+
 [31] 547+   8    1   55+  69  499+ 448+   0  158+  31  246+ 230+  19
118+  54
 [46]  48+  45+  21+ 670+ 585  558+ 544+ 494  481+ 474+ 472+ 461  447
446+ 443+
 [61] 429+ 423+ 401  395+ 390  390+ 389+ 383+ 383+ 373+ 362+ 354  344+
342  336+
 [76] 335+ 326+ 306  300+ 292  284+ 280+ 271  246+ 237+ 234  233+ 233
230+ 230+
 [91] 226+ 225+ 218+ 215  211+ 199+ 191+ 191  190+ 184+ 169+ 163+ 161+
153  150
[106] 129+ 110+ 107+ 100+  84+  77+  69+  52+  38+  11+
> names(wall.via)
 [1] "Description" "Patient"     "Physician"   "MRN"         "Age"
 [6] "Status"      "Days"        "Cr"          "INR"         "BR"
[11] "MELD"        "type"

I can guess pretty accurately by looking at the graph what the survival
rates are at each interval, but I would like to understand how to
instruct R to calculate it. Hope I have made this clear. I am just a
beginner, so forgive me if this is trivial. It just isn't clear to me.

Thanks,
Greg



More information about the R-help mailing list