The time-transform (tt() arguments) feature is the most recent addition to coxph. Most of the follow-up functions, in particular survfit(fit) have not yet been updated to deal with such models. Your message points out that I need to at least update them to add a "not yet available" error message. I'm still learning what can be done with the tt() option. If I assume that your trmt variable is 0/1, then the code below is a clever way to look at time dependent treatment effects. I had not thought of it.
Terry Therneau --- begin included message --- Let's assume I have a clinical trial with two treatments and a time to event outcome. I am trying to fit a Cox model with a time dependent treatment effect and then plot the predicted survival curve for one treatment (or both). library(survival) test <- list(time=runif(100,0,10),event=sample(0:1,100,replace=T),trmt=sample(0:1,100,replace=T)) model1 <- coxph(Surv(time, event) ~ tt(trmt), data=test, tt=function(x, t, ...) pspline(x + t)) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.