Learn R Programming

flexsurv (version 2.3.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,097

Version

2.3.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

August 17th, 2024

Functions in flexsurv (2.3.2)

AICc.flexsurvreg

Second-order Akaike information criterion
BIC.flexsurvreg

Bayesian Information Criterion (BIC) for comparison of flexsurvreg models
plot.standsurv

Plot standardized metrics from a fitted flexsurv model
Llogis

The log-logistic distribution
AICc

Second-order Akaike information criterion
quantile_flexsurvmix

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

Weibull distribution in proportional hazards parameterisation
Survspline

Royston/Parmar spline survival distribution
meanfinal_fmixmsm

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

The Gompertz distribution
Survsplinek

Royston/Parmar spline survival distribution functions with one argument per parameter
plot.flexsurvreg

Plots of fitted flexible survival models
GenF

Generalized F distribution
GenGamma.orig

Generalized gamma distribution (original parameterisation)
GenGamma

Generalized gamma distribution
bos

Bronchiolitis obliterans syndrome after lung transplants
augment.flexsurvreg

Augment data with information from a flexsurv model object
flexsurv-package

flexsurv: Flexible parametric survival and multi-state models
AIC.fmsm

Akaike's information criterion from a flexible parametric multistate model
pdf_flexsurvmix

Fitted densities for times to events in a flexsurvmix model
totlos.fs

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

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

Natural cubic spline basis
fmixmsm

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

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

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

Log likelihood from a flexsurvreg model
flexsurvspline

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

Add fitted flexible survival curves to a plot
p_flexsurvmix

Transition probabilities from a flexsurvmix model
ajfit

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

Simulate times to competing events from a mixture multi-state model
GenF.orig

Generalized F distribution (original parameterisation)
hexp

Hazard and cumulative hazard functions
coxsnell_flexsurvreg

Cox-Snell residuals from a parametric survival model
plot.survrtrunc

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

Breast cancer survival data
bootci.fmsm

Bootstrap confidence intervals for flexsurv output functions
qfinal_fmixmsm

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

Extract original data from flexsurvreg objects.
residuals.flexsurvreg

Calculate residuals for flexible survival models
reexports

Objects exported from other packages
ajfit_flexsurvmix

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

Variance-covariance matrix from a flexsurvreg model
pmatrix.simfs

Transition probability matrix from a fully-parametric, semi-Markov multi-state model
msfit.flexsurvreg

Cumulative intensity function for parametric multi-state models
glance.flexsurvreg

Glance at a flexsurv model object
model.frame.flexsurvmix

Model frame from a flexsurvmix object
.hess_to_cov

helper function to safely convert a Hessian matrix to covariance matrix
.hessian

Numerical evaluation of the hessian of a function using numDeriv::hessian
summary.flexsurvrtrunc

Summarise quantities of interest from fitted flexsurvrtrunc models
mean_flexsurvmix

Mean times to events from a flexsurvmix model
ajfit_fmsm

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

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

Mean and restricted mean survival functions
flexsurvmix

Flexible parametric mixture models for times to competing events
tidy.flexsurvreg

Tidy 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
simfs_bytrans

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

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

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

Generic function to find restricted mean survival time for some distribution
ppath_fmixmsm

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

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

Probabilities of competing events from a flexsurvmix model
pmatrix.fs

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

Extract model coefficients from fitted flexible survival models
sim.fmsm

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

Summaries of fitted flexible survival models
standsurv

Marginal survival and hazards of fitted flexsurvreg models
fmsm

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

Predictions from flexible survival models
totlos.simfs

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

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

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

Simulate from the asymptotic normal distribution of parameter estimates.
qgeneric

Generic function to find quantiles of a distribution
simulate.flexsurvreg

Simulate censored time-to-event data from a fitted flexsurvreg model
tidy.standsurv

Tidy a standsurv object.