make.surv | R Documentation |
Creates the survival curves for the fitted model(s)
make.surv(fit, mod = 1, t = NULL, newdata = NULL, nsim = 1, ...)
fit |
the result of the call to the |
mod |
the index of the model. Default value is 1, but the user can
choose which model fit to visualise, if the call to |
t |
the time vector to be used for the estimation of the survival curve |
newdata |
a list (of lists), specifying the values of the covariates
at which the computation is performed. For example
|
nsim |
The number of simulations from the distribution of the survival
curves. Default at |
... |
Additional options |
Gianluca Baio
G Baio (2019). survHE: Survival analysis for health economic evaluation and cost-effectiveness modelling. Journal of Statistical Software (2020). vol 95, 14, 1-47. doi:10.18637/jss.v095.i14
fit.models
, psa.plot
, write.surv
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.