if (FALSE) {
# Loads an example dataset from 'flexsurv'
data(bc)
# Fits the same model using the 3 inference methods
mle <- fit.models(formula=Surv(recyrs,censrec) ~ group, data=bc,
distr="exp", method="mle")
p.mle <- make.surv(mle)
psa.plot(p.mle)
# Can also use the main 'plot' function to visualise the survival curves
# and include uncertainty by using a number 'nsim' of simulations
plot(mle, nsim=10)
}
Run the code above in your browser using DataLab