HTAtlas
← Back to explore

flexsurv

Software Packagepeer-reviewed✓ Source-grounded

flexsurv is a tool in R that helps researchers model how long it takes for health events to happen, like recovery or disease progression, using flexible statistical methods. It can predict outcomes and support decision-making in healthcare evaluations.

At a glance

Use when

Modeling time-to-event data with a need for extrapolation (e.g., in cost-effectiveness models), when standard non-parametric methods are insufficient, or when incorporating complex covariate effects or multi-state transitions

Avoid when

Non-parametric or semi-parametric methods (e.g., Kaplan-Meier, Cox models) are sufficient, or when there is insufficient data to support parametric assumptions

Inputs

Survival data in the form of 'Surv' objects (including time, event status, and optionally truncation), covariates, user- or built-in parametric distribution specifications (PDF, hazard, CDF)

Outputs

Fitted parametric survival models, parameter estimates with confidence intervals, predicted survival curves, transition probabilities in multi-state models, extrapolated time-to-event outcomes

How it works

flexsurv is an R package for fully-parametric survival analysis, supporting user-defined or built-in time-to-event distributions (e.g., generalized gamma, F, Royston-Parmar spline models). Parameters can be modeled as linear or log-linear functions of covariates. Model fitting via maximum likelihood using flexsurvreg, with syntax similar to survreg. Supports right-censoring, left-truncation via Surv objects. Provides inference and visualization for functions of parameters. Integrates with mstate for multi-state modeling.

HTA domains
Clinical Effectiveness, Costs & Economic Evaluation
Assumptions
Time-to-event data follow a specified parametric distribution; proportional or time-dependent hazards as modeled; correct specification of covariate effects; maximum likelihood assumptions (e.g., independence, correct censoring structure)
Strengths
High flexibility in choosing and defining survival distributions,Support for complex parametric models including spline-based and multi-state models,Seamless integration with R and other packages like mstate,User-friendly syntax modeled on standard survival package,Comprehensive inference and visualization of functions of parameters
Limitations
Requires correct specification of parametric distribution, which may be unknown,May be sensitive to model misspecification in extrapolation,Steeper learning curve for users unfamiliar with parametric survival modeling,Computational intensity increases with model complexity
Also known as
flexsurv package, flexsurv R package

Questions this answers

References & sources

Similar by meaning

Beta record. Generated from the primary source via AI extraction and independent audit, pending final human review.