[R] survreg and predict probability of failure

Therneau, Terry M., Ph.D. therneau at mayo.edu
Mon Mar 17 13:25:42 CET 2014


-- begin included message ---
Hi,
I am fitting a weibull model as follows
my models is

s <- Surv(DFBR$Time,DFBR$Censor)

wei <- survreg(s~Group+UsefulLife,data = DFBR,dist="weibull")



How can i predict the probabilty of failure in next 10 days, for a new data with group =10 
and usefuleLife =100
Thx
shilpi  		 	   		

--- end inclusion ---

You need to create the cumulative failure curve:

  scurve <- predict(wei, newdata=data.frame(Group=10, UsefulLife=100), type="quantile",
	    p=seq(.1, .9, length=9))
  plot(scurve, seq(.1, .9, length=9), type='b')

This will give you the time points at which 10%, 20%, ..90% of the units are expected to 
fail.  If you want more precision repeat the process to "zero in" on the quantiles that 
are close to your time point.

Terry Therneau




More information about the R-help mailing list