isurvfit: Create survival curves based on the IDP model In IDPSurvival: Imprecise Dirichlet Process for Survival Analysis

Description

This function creates survival curves from right censored data using the prior near-ignorance Dirichlet Process (IDP).

Usage

 1 2 3 isurvfit(formula, data, s=0.5, weights, subset, display=TRUE, conf.type=c('exact', 'approx', 'none'), nsamples=10000, conf.int= .95)

Arguments

 formula a formula object, which must have a Surv object as the response on the left of the ~ operator and, if desired, terms separated by + operators on the right. For a single survival curve the right hand side should be ~ 1. data a data frame in which to interpret the variables named in the formula, subset and weights arguments. s sets the value of the prior strength s of the Dirichlet Process. weights the weights must be finite and nonnegative; it is strongly recommended that they be strictly positive, since zero weights are ambiguous, compared to use of the subset argument. subset expression saying that only a subset of the rows of the data should be used in the fit. display determines whether the survival curves have to be plotted (TRUE) or not (FALSE). conf.type a variable saying how the credible interval shold be computed: 'exact': Monte-Carlo smapling from the exact distribution, 'approx': Gaussian approximation, 'none': no credible interval is computed. nsamples number pf samples used to approximate the credible intervals if conf.type='exact'. conf.int confidence level of the credible interval.

Details

The estimates are obtained using the IDP estimator by Mangili and others (2014) based on the prior near-ignorance Dirichlet Process model by Benavoli and others (2014).

Value

an object of class "isurvfit".

See isurvfit.object for details. Methods defined for survfit objects are print and plot.

References

Benavoli, A., Mangili, F., Zaffalon, M. and Ruggeri, F. (2014). Imprecise Dirichlet process with application to the hypothesis test on the probability that X < Y. ArXiv e-prints, http://adsabs.harvard.edu/abs/2014arXiv1402.2755B.

Mangili, F., Benavoli, A., Zaffalon, M. and de Campos, C. (2014). Imprecise Dirichlet Process for the estimate and comparison of survival functions with censored data.