Re: [R] Plotting survival curves after multiple imputation

2013-02-23 Thread Frank Harrell
I haven't seen anyone solve this. I think it would be reasonable to do a time point by time point averaging (over multiple imputations) of the underlying survival curve, although there is some question about whether to "freeze" the centering constant (sum of beta times covariate mean). What will

Re: [R] Plotting survival curves after multiple imputation

2013-02-23 Thread W Robert Long
Can anyone help with this ? On 14/02/2013 14:07, Robert Long wrote: I am working with some survival data with missing values. I am using the mice package to do multiple imputation. I have found code in this thread which handles pooling of the MI results: https://stat.ethz.ch/pipermail/r-help/2

[R] Plotting survival curves after multiple imputation

2013-02-14 Thread Robert Long
I am working with some survival data with missing values. I am using the mice package to do multiple imputation. I have found code in this thread which handles pooling of the MI results: https://stat.ethz.ch/pipermail/r-help/2007-May/132180.html Now I would like to plot a survival curve using th

Re: [R] Plotting survival curves from a Cox model with time dependent covariates

2011-07-15 Thread Terry Therneau
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

[R] Plotting survival curves from a Cox model with time dependent covariates

2011-07-15 Thread Bjoern
Dear all, 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),e

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread Dennis Murphy
Hi: Here's one way to put all the plots in one graph using ggplot2 and a couple of tricks using the plyr package. You could take the data frame I generate below and use it as input to lattice graphics if you prefer. For groupwise plots, either as an ensemble or as separate panels, these packages a

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread Bert Gunter
Yes. Trellis plots are in the "lattice" package. My bad. -- Bert On Tue, Jul 5, 2011 at 3:22 PM, Steve Lianoglou wrote: > Quick note: > > On Tue, Jul 5, 2011 at 6:16 PM, Bert Gunter wrote: >> Yes, it can be done using basic plot commands. >> >> But if you really want to get fancy and plot "grou

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread David Winsemius
On Jul 5, 2011, at 6:24 PM, David Winsemius wrote: On Jul 5, 2011, at 6:08 PM, Trey Batey wrote: Hello. This is a follow-up to a question I posted last week. With some previous suggestions from the R-help community, I have been able to plot survival (, hazard, and density) curves using pub

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread David Winsemius
On Jul 5, 2011, at 6:08 PM, Trey Batey wrote: Hello. This is a follow-up to a question I posted last week. With some previous suggestions from the R-help community, I have been able to plot survival (, hazard, and density) curves using published data for Siler hazard parameters from a number

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread Steve Lianoglou
Quick note: On Tue, Jul 5, 2011 at 6:16 PM, Bert Gunter wrote: > Yes, it can be done using basic plot commands. > > But if you really want to get fancy and plot "grouped" graphs, I > strongly recommend you look into R's packages -- ggplot or trellis. Attempting to clear out any confusion before

Re: [R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread Bert Gunter
Yes, it can be done using basic plot commands. But if you really want to get fancy and plot "grouped" graphs, I strongly recommend you look into R's packages -- ggplot or trellis. Both have excellent documentation and companion books and were built for this sort of thing. The (considerable) learn

[R] plotting survival curves (multiple curves on single graph)

2011-07-05 Thread Trey Batey
Hello. This is a follow-up to a question I posted last week. With some previous suggestions from the R-help community, I have been able to plot survival (, hazard, and density) curves using published data for Siler hazard parameters from a number of ethnographic populations. Can the function belo

Re: [R] plotting survival curves with model parameters

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 6:26 PM, David Winsemius wrote: On Jun 28, 2011, at 5:46 PM, Trey Batey wrote: Hello. I am trying to write an R function to plot the survival function (and associated hazard and density) for a Siler competing hazards model. This model is similar to the Gompertz-Makeham,

Re: [R] plotting survival curves with model parameters

2011-06-28 Thread David Winsemius
On Jun 28, 2011, at 5:46 PM, Trey Batey wrote: Hello. I am trying to write an R function to plot the survival function (and associated hazard and density) for a Siler competing hazards model. This model is similar to the Gompertz-Makeham, with the addition of a juvenile component that includes

[R] plotting survival curves with model parameters

2011-06-28 Thread Trey Batey
Hello. I am trying to write an R function to plot the survival function (and associated hazard and density) for a Siler competing hazards model. This model is similar to the Gompertz-Makeham, with the addition of a juvenile component that includes two parameters---one that describes the initial in

Re: [R] plotting survival curves

2007-10-26 Thread Terry Therneau
You have (unimportant lines omitted) > c2= survdiff(Surv(act.surv.time,censoring)~treatgrp ,data=b) > plot(c2) The problem is that you are using the wrong function. It is survfit that creates plottable survival curves, survdiff only does the log-rank test. Terry Therneau