How to tell whether a predictor in a survival model useful? For the question below (e), I think I need to compare the median survival times for two groups so that I can decide whether AG is a useful predictor. To do so, I  wrote the code below, but do not know how to do that in R:

zaman  <- c(65,156,100,134,16,108,121,4,39,143,56,26,22,1,1,5,65,
56,65,17,7,16,22,3,4,2,3,8,4,3,30,4,43)
test <- c(rep(1,17),rep(0,16))
WBC <- c(2.3,0.75,4.3,2.6,6,10.5,10,17,5.4,7,9.4,32,35,100,
100,52,100,4.4,3,4,1.5,9,5.3,10,19,27,28,31,26,21,79,100,100)
status <- c(rep(1,33))
data <- data.frame(zaman,test,WBC)

# test positive
surv3 <- Surv(zaman[test==1], status[test==1])
fit3 <- survreg( surv3 ~ log(WBC[test==1]),dist="w")

#test negative
surv4 <- Surv(zaman[test==0], status[test==0])
fit4 <- survreg(surv4 ~ log(WBC[test==0]),dist="w")

Any idea how to do that in R?
 A: The predict method for survreg objects is helpful here:
predict(fit3, newdata=subset(data,test==1), type='quantile', p=0.5, se=TRUE)

predict(fit4, newdata=subset(data,test==0), type='quantile', p=0.5, se=TRUE)

But if you really want to see if test produces different survival curves, it is probably easiest to use the log-rank test to compare two survival curves.
km.test <- survdiff(Surv(zaman,status)~test,data=data)
km.test

Call:
survdiff(formula = Surv(zaman, status) ~ test, data = data)

        N Observed Expected (O-E)^2/E (O-E)^2/V
test=0 16       16      9.3      4.83      8.45
test=1 17       17     23.7      1.90      8.45

 Chisq= 8.4  on 1 degrees of freedom, p= 0.00365 

km.fit <- survfit(Surv(zaman,status)~test,data=data)
km.fit

Call: survfit(formula = Surv(zaman, status) ~ test, data = data)

       records n.max n.start events median 0.95LCL 0.95UCL
test=0      16    16      16     16    7.5       4      43
test=1      17    17      17     17   56.0      22     121

plot(km.fit)


