[R] Problem with plotting survival predictions from cph model

Frank E Harrell Jr f.harrell at Vanderbilt.Edu
Wed May 26 20:20:59 CEST 2010


On 05/26/2010 10:55 AM, Michal Figurski wrote:
> Dear R-helpers,
>
> I am working with 'cph' models from 'rms' library. When I build simple
> survival models, based on 'Surv(time, event)', everything is fine and I
> can make nice plots using plot(Predict(f, time=3)).
>
> However, recently I tried to be more specific and used 'Surv(start,
> stop, event)' type model. Using this model 'plot(Predict(f))' works OK,
> but 'plot(Predict(f, time=3))' throws an error:
>
> "Error in summary.survfit(g, print.it = FALSE, times = times) :
> object 'n.enter' not found"
>
> Actually, using 'survest(f, time=3)' has the same result.
>
> Has anybody encountered this kind of error? Is there a workaround?
>
> Best regards,
>

Please provide a tiny self-contained reproducible example, e.g., using 
simulated data.

Frank

-- 
Frank E Harrell Jr   Professor and Chairman        School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list