Learn R Programming

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

flexsurv (version 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

7,794

Version

2.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

June 17th, 2022

Functions in flexsurv (2.2)

WeibullPH

Weibull distribution in proportional hazards parameterisation
GenGamma

Generalized gamma distribution
ajfit

Aalen-Johansen nonparametric estimates comparable to a fitted flexsurvmix model
Llogis

The log-logistic distribution
Gompertz

The Gompertz distribution
GenGamma.orig

Generalized gamma distribution (original parameterisation)
GenF

Generalized F distribution
Survspline

Royston/Parmar spline survival distribution
bos

Bronchiolitis obliterans syndrome after lung transplants
GenF.orig

Generalized F distribution (original parameterisation)
coef.flexsurvreg

Extract model coefficients from fitted flexible survival models
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
Survsplinek

Royston/Parmar spline survival distribution functions
bootci.fmsm

Bootstrap confidence intervals for flexsurv output functions
bc

Breast cancer survival data
fmixmsm

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

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

helper function to safely convert a Hessian matrix to covariance matrix
coxsnell_flexsurvreg

Cox-Snell residuals from a parametric survival model
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
basis

Natural cubic spline basis
augment.flexsurvreg

Augment data with information from a flexsurv model object
flexsurvmix

Flexible parametric mixture models for times to competing events
hexp

Hazard and cumulative hazard functions
normboot.flexsurvreg

Simulate from the asymptotic normal distribution of parameter estimates.
nobs.flexsurvreg

Number of observations contributing to a fitted flexible survival model
lines.flexsurvreg

Add fitted flexible survival curves to a plot
get_basepars

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

Glance at a flexsurv model object
flexsurvreg

Flexible parametric regression for time-to-event data
meanfinal_fmixmsm

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

Fitted densities for times to events in a flexsurvmix model
pfinal_fmsm

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

Hazard ratio as a function of time from a parametric survival model
pmatrix.fs

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

Plot nonparametric estimates of survival from right-truncated data.
predict.flexsurvreg

Predictions from flexible survival models
plot.standsurv

Plot standardized metrics from a fitted flexsurv model
plot.flexsurvreg

Plots of fitted flexible survival models
pars.fmsm

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

Mean times to events from a flexsurvmix model
p_flexsurvmix

Transition probabilities from a flexsurvmix model
residuals.flexsurvreg

Calculate residuals for flexible survival models
probs_flexsurvmix

Probabilities of competing events from a flexsurvmix model
standsurv

Marginal survival and hazards of fitted flexsurvreg models
reexports

Objects exported from other packages
quantile_flexsurvmix

Quantiles of time-to-event distributions in a flexsurvmix model
tidy.flexsurvreg

Tidy a flexsurv model object
flexsurv-package

flexsurv: Flexible parametric survival and multi-state models
.hessian

Numerical evaluation of the hessian of a function using numDeriv::hessian
totlos.fs

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

Transition probability matrix from a fully-parametric, semi-Markov multi-state model
tidy.standsurv

Tidy a standsurv object.
summary.flexsurvreg

Summaries of fitted flexible survival models
mean_exp

Mean and restricted mean survival functions
qfinal_fmixmsm

Quantiles of the distribution of the time until reaching a final state in a mixture multi-state model
summary.flexsurvrtrunc

Summarise quantities of interest from fitted flexsurvrtrunc models
totlos.simfs

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

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

Generic function to find quantiles of a distribution
simt_flexsurvmix

Simulate times to competing events from a mixture multi-state model
rmst_flexsurvmix

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

Simulate datasets from a fitted flexsurvreg model
ppath_fmixmsm

Probability of each pathway taken through a mixture multi-state model
rmst_generic

Generic function to find restricted mean survival of a distribution
sim.fmsm

Simulate paths through a fully parametric semi-Markov multi-state model
unroll.function

Convert a function with matrix arguments to a function with vector arguments.
simfs_bytrans

Reformat simulated multi-state data with one row per simulated transition
simfinal_fmsm

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