Learn R Programming

⚠️There's a newer version (2.3.2) of this package.Take me there.

flexsurv (version 2.2.2)

Flexible Parametric Survival and Multi-State Models

Description

Flexible parametric models for time-to-event data, including the Royston-Parmar spline model, generalized gamma and generalized F distributions. Any user-defined parametric distribution can be fitted, given at least an R function defining the probability density or hazard. There are also tools for fitting and predicting from fully parametric multi-state models, based on either cause-specific hazards or mixture models.

Copy Link

Version

Install

install.packages('flexsurv')

Monthly Downloads

8,465

Version

2.2.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Christopher Jackson

Last Published

February 1st, 2023

Functions in flexsurv (2.2.2)

Survspline

Royston/Parmar spline survival distribution
Survsplinek

Royston/Parmar spline survival distribution functions
Gompertz

The Gompertz distribution
ajfit

Aalen-Johansen nonparametric estimates comparable to a fitted flexsurvmix model
GenF.orig

Generalized F distribution (original parameterisation)
WeibullPH

Weibull distribution in proportional hazards parameterisation
GenF

Generalized F distribution
GenGamma.orig

Generalized gamma distribution (original parameterisation)
Llogis

The log-logistic distribution
GenGamma

Generalized gamma distribution
coxsnell_flexsurvreg

Cox-Snell residuals from a parametric survival model
augment.flexsurvreg

Augment data with information from a flexsurv model object
ajfit_fmsm

Check the fit of Markov flexible parametric multi-state models against nonparametric estimates.
ajfit_flexsurvmix

Forms a tidy data frame for plotting the fit of parametric mixture multi-state models against nonparametric estimates
bootci.fmsm

Bootstrap confidence intervals for flexsurv output functions
bc

Breast cancer survival data
basis

Natural cubic spline basis
.hess_to_cov

helper function to safely convert a Hessian matrix to covariance matrix
coef.flexsurvreg

Extract model coefficients from fitted flexible survival models
bos

Bronchiolitis obliterans syndrome after lung transplants
.hessian

Numerical evaluation of the hessian of a function using numDeriv::hessian
fmixmsm

Constructor for a mixture multi-state model based on flexsurvmix
fmsm

Construct a multi-state model from a set of parametric survival models
glance.flexsurvreg

Glance at a flexsurv model object
get_basepars

Evaluate baseline time-to-event distribution parameters given covariate values in a flexsurvmix model
flexsurvreg

Flexible parametric regression for time-to-event data
flexsurvmix

Flexible parametric mixture models for times to competing events
flexsurv-package

flexsurv: Flexible parametric survival and multi-state models
flexsurvrtrunc

Flexible parametric models for right-truncated, uncensored data defined by times of initial and final events.
flexsurvspline

Flexible survival regression using the Royston/Parmar spline model.
model.frame.flexsurvreg

Extract original data from flexsurvreg objects.
msfit.flexsurvreg

Cumulative intensity function for parametric multi-state models
meanfinal_fmixmsm

Mean time to final state in a mixture multi-state model
mean_exp

Mean and restricted mean survival functions
mean_flexsurvmix

Mean times to events from a flexsurvmix model
lines.flexsurvreg

Add fitted flexible survival curves to a plot
nobs.flexsurvreg

Number of observations contributing to a fitted flexible survival model
plot.standsurv

Plot standardized metrics from a fitted flexsurv model
p_flexsurvmix

Transition probabilities from a flexsurvmix model
normboot.flexsurvreg

Simulate from the asymptotic normal distribution of parameter estimates.
pfinal_fmsm

Probabilities of final states in a flexible parametric competing risks model
pdf_flexsurvmix

Fitted densities for times to events in a flexsurvmix model
plot.flexsurvreg

Plots of fitted flexible survival models
plot.survrtrunc

Plot nonparametric estimates of survival from right-truncated data.
pmatrix.fs

Transition probability matrix from a fully-parametric, time-inhomogeneous Markov multi-state model
pars.fmsm

Transition-specific parameters in a flexible parametric multi-state model
quantile_flexsurvmix

Quantiles of time-to-event distributions in a flexsurvmix model
rmst_generic

Generic function to find restricted mean survival of a distribution
rmst_flexsurvmix

Restricted mean times to events from a flexsurvmix model
residuals.flexsurvreg

Calculate residuals for flexible survival models
ppath_fmixmsm

Probability of each pathway taken through a mixture multi-state model
pmatrix.simfs

Transition probability matrix from a fully-parametric, semi-Markov multi-state model
hr_flexsurvreg

Hazard ratio as a function of time from a parametric survival model
hexp

Hazard and cumulative hazard functions
sim.fmsm

Simulate paths through a fully parametric semi-Markov multi-state model
predict.flexsurvreg

Predictions from flexible survival models
probs_flexsurvmix

Probabilities of competing events from a flexsurvmix model
qfinal_fmixmsm

Quantiles of the distribution of the time until reaching a final state in a mixture multi-state model
reexports

Objects exported from other packages
qgeneric

Generic function to find quantiles of a distribution
summary.flexsurvrtrunc

Summarise quantities of interest from fitted flexsurvrtrunc models
survrtrunc

Nonparametric estimator of survival from right-truncated, uncensored data
standsurv

Marginal survival and hazards of fitted flexsurvreg models
simfinal_fmsm

Simulate and summarise final outcomes from a flexible parametric multi-state model
tidy.flexsurvreg

Tidy a flexsurv model object
simfs_bytrans

Reformat simulated multi-state data with one row per simulated transition
summary.flexsurvreg

Summaries of fitted flexible survival models
tidy.standsurv

Tidy a standsurv object.
simt_flexsurvmix

Simulate times to competing events from a mixture multi-state model
unroll.function

Convert a function with matrix arguments to a function with vector arguments.
simulate.flexsurvreg

Simulate censored time-to-event data from a fitted flexsurvreg model
totlos.simfs

Expected total length of stay in specific states, from a fully-parametric, semi-Markov multi-state model
totlos.fs

Total length of stay in particular states for a fully-parametric, time-inhomogeneous Markov multi-state model