Skip to content

Problem with plotting survival predictions from cph model

2 messages · Michal Figurski, Frank E Harrell Jr

#
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,
#
On 05/26/2010 10:55 AM, Michal Figurski wrote:
Please provide a tiny self-contained reproducible example, e.g., using 
simulated data.

Frank