I have used flexsurvreg to estimate the parameters of a Weibull distribution and got the following output. I would like to reconstruct the survival function to estimate the survival rate at a given time t.
flexsurvreg(formula = Surv(time, Censor) ~ 1, data = CC, dist = "weibull")
shape 1.02
scale 2630.00
I have read the flexsurvreg document but it is still not very clear to me. Could anyone please point me in the right direction?
My plan is then to use Excel weibull.dist function to estimate the survival rate at a given point in time.
Best Answer
Weibull distribution has probability density function
$$ f(x;\lambda,k) = \begin{cases} \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1}e^{-(x/\lambda)^{k}} & x\geq0 ,\\ 0 & x<0 \end{cases} $$
where $\lambda>0$ is scale parameter and $k>0$ is shape parameter. Different values of parameters are presented on the plot below.
Basically, as the names suggests, shape parameter controls it's shape and scale parameter makes it wider or narrower (notice the $x/\lambda$ parts of probability density function). To gain more intuition you can plot yourself the distribution with different parameter values and check what happens when you change them.
The description of shape parameter is nicely summarized on Wikipedia: