# Flexible Parametric Survival and Multi-State Models

## Documentation for package ‘flexsurv’ version 2.3

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C D F G H L M N P Q R S T U V W

flexsurv-package | flexsurv: Flexible parametric survival and multi-state models

## -- A --

AIC.fmsm | Akaike's information criterion from a flexible parametric multistate model
AICC | Second-order Akaike information criterion
AICc | Second-order Akaike information criterion
AICC.flexsurvreg | Second-order Akaike information criterion
AICc.flexsurvreg | Second-order Akaike information criterion
ajfit | Aalen-Johansen nonparametric estimates comparable to a fitted flexsurvmix model
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.
augment.flexsurvreg | Augment data with information from a flexsurv model object

## -- B --

basis | Natural cubic spline basis
bc | Breast cancer survival data
BIC.flexsurvreg | Bayesian Information Criterion (BIC) for comparison of flexsurvreg models
bootci.fmsm | Bootstrap confidence intervals for flexsurv output functions
bos | Bronchiolitis obliterans syndrome after lung transplants
bosms3 | Bronchiolitis obliterans syndrome after lung transplants
bosms4 | Bronchiolitis obliterans syndrome after lung transplants

## -- C --

coef.flexsurvreg | Extract model coefficients from fitted flexible survival models
coxsnell_flexsurvreg | Cox-Snell residuals from a parametric survival model

## -- D --

dbasis | Natural cubic spline basis
dfss | Natural cubic spline basis
dgenf | Generalized F distribution
dgenf.orig | Generalized F distribution (original parameterisation)
dgengamma | Generalized gamma distribution
dgengamma.orig | Generalized gamma distribution (original parameterisation)
dgompertz | The Gompertz distribution
dllogis | The log-logistic distribution
dsurvspline | Royston/Parmar spline survival distribution
dsurvspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
dsurvspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
dsurvspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
dsurvspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
dsurvspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
dsurvspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
dsurvspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
dsurvspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
dweibullPH | Weibull distribution in proportional hazards parameterisation

## -- F --

flexsurv | flexsurv: Flexible parametric survival and multi-state models
flexsurv.dists | Flexible parametric regression for time-to-event data
flexsurvmix | Flexible parametric mixture models for times to competing events
flexsurvreg | Flexible parametric regression for time-to-event data
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.
fmixmsm | Constructor for a mixture multi-state model based on flexsurvmix
fmsm | Construct a multi-state model from a set of parametric survival models
fss | Natural cubic spline basis

## -- G --

GenF | Generalized F distribution
GenF.orig | Generalized F distribution (original parameterisation)
GenGamma | Generalized gamma distribution
GenGamma.orig | Generalized gamma distribution (original parameterisation)
get_basepars | Evaluate baseline time-to-event distribution parameters given covariate values in a flexsurvmix model
glance.flexsurvreg | Glance at a flexsurv model object
Gompertz | The Gompertz distribution

## -- H --

hazard | Hazard and cumulative hazard functions
Hexp | Hazard and cumulative hazard functions
hexp | Hazard and cumulative hazard functions
Hgamma | Hazard and cumulative hazard functions
hgamma | Hazard and cumulative hazard functions
Hgenf | Generalized F distribution
hgenf | Generalized F distribution
Hgenf.orig | Generalized F distribution (original parameterisation)
hgenf.orig | Generalized F distribution (original parameterisation)
Hgengamma | Generalized gamma distribution
hgengamma | Generalized gamma distribution
Hgengamma.orig | Generalized gamma distribution (original parameterisation)
hgengamma.orig | Generalized gamma distribution (original parameterisation)
Hgompertz | The Gompertz distribution
hgompertz | The Gompertz distribution
Hllogis | The log-logistic distribution
hllogis | The log-logistic distribution
Hlnorm | Hazard and cumulative hazard functions
hlnorm | Hazard and cumulative hazard functions
hr_flexsurvreg | Hazard ratio as a function of time from a parametric survival model
Hsurvspline | Royston/Parmar spline survival distribution
hsurvspline | Royston/Parmar spline survival distribution
Hsurvspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hsurvspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hsurvspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hsurvspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hsurvspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hsurvspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hsurvspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hsurvspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
hsurvspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
Hweibull | Hazard and cumulative hazard functions
hweibull | Hazard and cumulative hazard functions
HweibullPH | Weibull distribution in proportional hazards parameterisation
hweibullPH | Weibull distribution in proportional hazards parameterisation

## -- L --

lines.flexsurvreg | Add fitted flexible survival curves to a plot
lines.survrtrunc | Plot nonparametric estimates of survival from right-truncated data.
Llogis | The log-logistic distribution
logLik.flexsurvreg | Log likelihood from a flexsurvreg model

## -- M --

meanfinal_fmixmsm | Mean time to final state in a mixture multi-state model
means | Mean and restricted mean survival functions
mean_exp | Mean and restricted mean survival functions
mean_flexsurvmix | Mean times to events from a flexsurvmix model
mean_gamma | Mean and restricted mean survival functions
mean_genf | Mean and restricted mean survival functions
mean_genf.orig | Mean and restricted mean survival functions
mean_gengamma | Mean and restricted mean survival functions
mean_gengamma.orig | Mean and restricted mean survival functions
mean_gompertz | Mean and restricted mean survival functions
mean_llogis | Mean and restricted mean survival functions
mean_lnorm | Mean and restricted mean survival functions
mean_survspline | Royston/Parmar spline survival distribution
mean_survspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_survspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_survspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_survspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_survspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_survspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_survspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_survspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
mean_weibull | Mean and restricted mean survival functions
mean_weibullPH | Mean and restricted mean survival functions
model.frame.flexsurvmix | Model frame from a flexsurvmix object
model.frame.flexsurvreg | Extract original data from 'flexsurvreg' objects.
model.matrix.flexsurvreg | Extract original data from 'flexsurvreg' objects.
msfit.flexsurvreg | Cumulative intensity function for parametric multi-state models

## -- N --

nobs.flexsurvreg | Number of observations contributing to a fitted flexible survival model
normboot.flexsurvreg | Simulate from the asymptotic normal distribution of parameter estimates.

## -- P --

pars.fmsm | Transition-specific parameters in a flexible parametric 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
pgenf | Generalized F distribution
pgenf.orig | Generalized F distribution (original parameterisation)
pgengamma | Generalized gamma distribution
pgengamma.orig | Generalized gamma distribution (original parameterisation)
pgompertz | The Gompertz distribution
pllogis | The log-logistic distribution
plot.flexsurvreg | Plots of fitted flexible survival models
plot.standsurv | Plot standardized metrics from a fitted flexsurv model
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
pmatrix.simfs | Transition probability matrix from a fully-parametric, semi-Markov multi-state model
ppath_fmixmsm | Probability of each pathway taken through a mixture multi-state model
predict.flexsurvreg | Predictions from flexible survival models
probs_flexsurvmix | Probabilities of competing events from a flexsurvmix model
psurvspline | Royston/Parmar spline survival distribution
psurvspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
psurvspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
psurvspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
psurvspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
psurvspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
psurvspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
psurvspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
psurvspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
pweibullPH | Weibull distribution in proportional hazards parameterisation
p_flexsurvmix | Transition probabilities from a flexsurvmix model

## -- Q --

qfinal_fmixmsm | Quantiles of the distribution of the time until reaching a final state in a mixture multi-state model
qgeneric | Generic function to find quantiles of a distribution
qgenf | Generalized F distribution
qgenf.orig | Generalized F distribution (original parameterisation)
qgengamma | Generalized gamma distribution
qgengamma.orig | Generalized gamma distribution (original parameterisation)
qgompertz | The Gompertz distribution
qllogis | The log-logistic distribution
qsurvspline | Royston/Parmar spline survival distribution
qsurvspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
qsurvspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
qsurvspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
qsurvspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
qsurvspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
qsurvspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
qsurvspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
qsurvspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
quantile_flexsurvmix | Quantiles of time-to-event distributions in a flexsurvmix model
qweibullPH | Weibull distribution in proportional hazards parameterisation

## -- R --

residuals.flexsurvreg | Calculate residuals for flexible survival models
rgenf | Generalized F distribution
rgenf.orig | Generalized F distribution (original parameterisation)
rgengamma | Generalized gamma distribution
rgengamma.orig | Generalized gamma distribution (original parameterisation)
rgompertz | The Gompertz distribution
rllogis | The log-logistic distribution
rmst_exp | Mean and restricted mean survival functions
rmst_flexsurvmix | Restricted mean times to events from a flexsurvmix model
rmst_gamma | Mean and restricted mean survival functions
rmst_generic | Generic function to find restricted mean survival time for some distribution
rmst_genf | Mean and restricted mean survival functions
rmst_genf.orig | Mean and restricted mean survival functions
rmst_gengamma | Mean and restricted mean survival functions
rmst_gengamma.orig | Mean and restricted mean survival functions
rmst_gompertz | Mean and restricted mean survival functions
rmst_llogis | Mean and restricted mean survival functions
rmst_lnorm | Mean and restricted mean survival functions
rmst_survspline | Royston/Parmar spline survival distribution
rmst_survspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_survspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_survspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_survspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_survspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_survspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_survspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_survspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
rmst_weibull | Mean and restricted mean survival functions
rmst_weibullPH | Mean and restricted mean survival functions
rsurvspline | Royston/Parmar spline survival distribution
rsurvspline0 | Royston/Parmar spline survival distribution functions with one argument per parameter
rsurvspline1 | Royston/Parmar spline survival distribution functions with one argument per parameter
rsurvspline2 | Royston/Parmar spline survival distribution functions with one argument per parameter
rsurvspline3 | Royston/Parmar spline survival distribution functions with one argument per parameter
rsurvspline4 | Royston/Parmar spline survival distribution functions with one argument per parameter
rsurvspline5 | Royston/Parmar spline survival distribution functions with one argument per parameter
rsurvspline6 | Royston/Parmar spline survival distribution functions with one argument per parameter
rsurvspline7 | Royston/Parmar spline survival distribution functions with one argument per parameter
rweibullPH | Weibull distribution in proportional hazards parameterisation

## -- S --

sim.fmsm | Simulate paths through a fully parametric semi-Markov multi-state model
simfinal_fmsm | Simulate and summarise final outcomes from a flexible parametric multi-state 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 censored time-to-event data from a fitted flexsurvreg model
standsurv | Marginal survival and hazards of fitted flexsurvreg models
summary.flexsurvreg | Summaries of fitted flexible survival models
summary.flexsurvrtrunc | Summarise quantities of interest from fitted flexsurvrtrunc models
survrtrunc | Nonparametric estimator of survival from right-truncated, uncensored data
Survspline | Royston/Parmar spline survival distribution
Survsplinek | Royston/Parmar spline survival distribution functions with one argument per parameter

## -- T --

tidy.flexsurvreg | Tidy a flexsurv model object
tidy.standsurv | Tidy a standsurv object.
totlos.fs | Total length of stay in particular states for a fully-parametric, time-inhomogeneous Markov multi-state model
totlos.simfs | Expected total length of stay in specific states, from a fully-parametric, semi-Markov multi-state model

## -- U --

unroll.function | Convert a function with matrix arguments to a function with vector arguments.

## -- V --

vcov.flexsurvreg | Variance-covariance matrix from a flexsurvreg model

## -- W --

WeibullPH | Weibull distribution in proportional hazards parameterisation