make.surv: Engine for Probabilistic Sensitivity Analysis on the survival...

Description Usage Arguments Author(s) References See Also Examples

View source: R/make.surv.R

Description

Creates the survival curves for the fitted model(s)

Usage

1
make.surv(fit,mod=1,t=NULL,newdata=NULL,nsim=1,...)

Arguments

fit

the result of the call to the fit.models function, containing the model fitting (and other relevant information)

mod

the index of the model. Default value is 1, but the user can choose which model fit to visualise, if the call to fit.models has a vector argument for distr (so many models are fitted & stored in the same object)

t

the time vector to be used for the estimation of the survival curve

newdata

a list (of lists), specifiying the values of the covariates at which the computation is performed. For example list(list(arm=0),list(arm=1)) will create two survival curves, one obtained by setting the covariate arm to the value 0 and the other by setting it to the value 1. In line with flexsurv notation, the user needs to either specify the value for *all* the covariates or for none (in which case, newdata=NULL, which is the default). If some value is specified and at least one of the covariates is continuous, then a single survival curve will be computed in correspondence of the average values of all the covariates (including the factors, which in this case are expanded into indicators).

nsim

The number of simulations from the distribution of the survival curves. Default at nsim=1, in which case uses the point estimate for the relevant distributional parameters and computes the resulting survival curve

...

Additional options

Author(s)

Gianluca Baio

References

Something will go here

See Also

Something will go here

Examples

1
2
3
4
5
6
7
# 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)

giabaio/survHE documentation built on Dec. 2, 2017, 10:10 a.m.