[R] plot(survfit(fitCox)) graph shows one line - should show two
jsorkin at grecc.umaryland.edu
Sun May 10 23:43:24 CEST 2009
I am trying to plot the results of a coxph using plot(survfit()). The plot should, I believe, show two lines one for survival in each of two treatment (Drug) groups, however my plot shows only one line. What am I doing wrong?
My code is reproduced below, my figure is attached to this EMail message.
> #Create simple survival object
coxph(formula = Surv(Time30, Died) ~ Drug, data = GVHDdata)
coef exp(coef) se(coef) z p
Drug[T.MXT+CSP] -1.15 0.316 0.518 -2.23 0.026
exp(coef) exp(-coef) lower .95 upper .95
Drug[T.MXT+CSP] 0.316 3.16 0.115 0.871
Rsquare= 0.086 (max possible= 0.915 )
Likelihood ratio test= 5.75 on 1 df, p=0.0165
Wald test = 4.96 on 1 df, p=0.026
Score (logrank) test = 5.52 on 1 df, p=0.0188
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
Baltimore, MD 21201-1524
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
More information about the R-help