Predict expected survival after n months with survreg weibul Context is a subscription business with a monthly cost. Goal is to understand expected lifetime of a subscription.
I have a weibul model via survreg package:
wb <-survreg(Surv(time = interval, event = censored) ~ 1, data = .x, dist = 'weibull')
 summary(wb)

Call:
survreg(formula = Surv(time = interval, event = censored) ~ 1, 
    data = .x, dist = "weibull")
              Value Std. Error     z      p
(Intercept)  2.0914     0.0142 147.6 <2e-16
Log(scale)  -0.1711     0.0131 -13.1 <2e-16

Scale= 0.843 

Weibull distribution
Loglik(model)= -11482.7   Loglik(intercept only)= -11482.7
Number of Newton-Raphson Iterations: 5 
n= 6618 

In this case there are no covariates, just a simple model.
Using predict, I can compute the expected survival, in this model in months, of a new observation (See predict.survreg on this pdf).
predict(wb, newdata = data.frame(1), type = 'response')
       1 
8.096338 

This, as I understand it, tells me that a new subscription is expected to last just over 8 months.
My question is, is it possible to calculate survival after 1:12 months? Is there a way that I can use predict() to compute the probability of a new subscription remaining in month1, month2, month3, etc?
 A: The documentation for survreg.distributions says:
"The location-scale parameterization of a Weibull distribution found in survreg is not the same as the parameterization of rweibull"
and
"survreg scale parameter maps to 1/shape, linear predictor to log(scale)"
So, I would try estimating the survival at months 1:12 by
1-pweibull(1:12,shape=1/exp(-0.1711),scale=exp(2.094))
A: With a parametric survival model, you have the advantage of a closed-form expression for the survival probability as a function of time. With a continuous distribution like the Weibull, the survival function is simply $1-F(t)$, where $F(t)$ is the cumulative distribution function. For the Weibull in the standard parameterization:
$$F(t;k,\lambda) = 1- \mathrm{e}^{-(t/\lambda)^k}$$
so the survival function is:
$$ S(t;k,\lambda) = \mathrm{e}^{-(t/\lambda)^k}.$$
Once you've established the parameter values from your model, you plug in the value of time $t$ and get your point estimate of survival up to that time. Unfortunately, there are several parameterizations of the Weibull, so you have to pay attention to which parameterization your software is using.
To get a nice plot of survival over time with confidence intervals, the last example on the manual page for predict.survreg shows how to proceed. The trick is to use the "quantile" type of prediction while specifying a large range of quantiles (e.g., 1st to 98th; the 100th is at infinite time) and plot each survival percentage along the vertical axis against its corresponding predicted time, plus/minus confidence intervals.
