Learn R Programming

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

flexsurv (version 2.1)

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

6,864

Version

2.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Christopher Jackson

Last Published

September 13th, 2021

Functions in flexsurv (2.1)

GenGamma.orig

Generalized gamma distribution (original parameterisation)
ajfit

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

Royston/Parmar spline survival distribution functions
WeibullPH

Weibull distribution in proportional hazards parameterisation
Llogis

The log-logistic distribution
GenF.orig

Generalized F distribution (original parameterisation)
Gompertz

The Gompertz distribution
Survspline

Royston/Parmar spline survival distribution
augment.flexsurvreg

Augment data with information from a flexsurv model object
GenF

Generalized F distribution
GenGamma

Generalized gamma distribution
coef.flexsurvreg

Extract model coefficients from fitted flexible survival models
bos

Bronchiolitis obliterans syndrome after lung transplants
get_basepars

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

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

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

Glance at a flexsurv model object
fmixmsm

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

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

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

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

Natural cubic spline basis
bc

Breast cancer survival data
.hess_to_cov

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

Transition probabilities from a flexsurvmix model
hexp

Hazard and cumulative hazard functions
pdf_flexsurvmix

Fitted densities for times to events in a flexsurvmix model
meanfinal_fmixmsm

Mean time to final state in a mixture multi-state model
pars.fmsm

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

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

Probability of each pathway taken through a mixture multi-state model
msfit.flexsurvreg

Cumulative intensity function for parametric multi-state models
mean_exp

Mean and restricted mean survival functions
model.frame.flexsurvreg

Extract original data from flexsurvreg objects.
bootci.fmsm

Bootstrap confidence intervals for flexsurv output functions
pmatrix.fs

Transition probability matrix from a fully-parametric, time-inhomogeneous Markov multi-state model
flexsurvmix

Flexible parametric mixture models for times to competing events
sim.fmsm

Simulate paths through a fully parametric semi-Markov multi-state model
flexsurv-package

flexsurv: Flexible parametric survival and multi-state models
nobs.flexsurvreg

Number of observations contributing to a fitted flexible survival model
simfs_bytrans

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

Simulate times to competing events from a mixture multi-state model
simulate.flexsurvreg

Simulate datasets from a fitted flexsurvreg model
summary.flexsurvreg

Summaries of fitted flexible survival models
lines.flexsurvreg

Add fitted flexible survival curves to a plot
simfinal_fmsm

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

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

Restricted mean times to events from a flexsurvmix model
flexsurvrtrunc

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

Mean times to events from a flexsurvmix model
rmst_generic

Generic function to find restricted mean survival of a distribution
probs_flexsurvmix

Probabilities of competing events from a flexsurvmix model
flexsurvreg

Flexible parametric regression for time-to-event data
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
tidy.flexsurvreg

Tidy a flexsurv model object
plot.survrtrunc

Plot nonparametric estimates of survival from right-truncated data.
survrtrunc

Nonparametric estimator of survival from right-truncated, uncensored data
summary.flexsurvrtrunc

Summarise quantities of interest from fitted flexsurvrtrunc models
normboot.flexsurvreg

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

Plots of fitted flexible survival models
totlos.fs

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

Calculate residuals for flexible survival models
unroll.function

Convert a function with matrix arguments to a function with vector arguments.
totlos.simfs

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

Predictions from flexible survival models
qgeneric

Generic function to find quantiles of a distribution
quantile_flexsurvmix

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