I have the following survreg model:
Call:
survreg(formula = Surv(time = (ev.time), event = ev) ~ age,
data = my.data, dist = \"weib\")
Value S
Your parameters are:
scale=exp(Intercept+beta*x) in your example and lets say for age=40
scale=283.7
your shape parameter is the reciprocal of the scale that the model outputs
shape=1/1.15
Then the hazard is:
curve((shape/scale)*(x/scale)^(shape-1), from=0,to=12,ylab=expression(hat(h)(t)), col="darkblue",xlab="t", lwd=5)
The cumulative hazard function is:
curve((x/scale)^(shape), from=0,to=12,ylab=expression(hat(F)(t)), col="darkgreen",xlab="t", lwd=5)
The Survival function is 1-the cumulative hazard function, so:
curve(1-((x/scale)^(shape)), from=0,to=12,ylab=expression(hat(S)(t)), col="darkred",xlab="t", lwd=5, ylim=c(0,1))
Also check out the eha package, and the function hweibull and Hweibull
