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

View source: R/make.surv.R

make.survR Documentation

Engine for Probabilistic Sensitivity Analysis on the survival curves

Description

Creates the survival curves for the fitted model(s) - Original code from survHE

Usage

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

Value

A list with survival times for the fitted models

Author(s)

Gianluca Baio

References

\insertRef

Baio.2020expertsurv

See Also

psa.plot (for example)


expertsurv documentation built on Oct. 5, 2023, 5:09 p.m.