Flexsurv
The flexsurv R package for flexible parametric survival and multi-state modelling
Install / Use
/learn @chjackson/FlexsurvREADME
flexsurv <img src="man/figures/flexsurv_hex.png" width="120" height="120" align="right" />
The flexsurv R package for parametric survival and multi-state modelling.
Key features
-
Parametric models for time-to-event (survival) data. Data may be right-censored, and/or left-censored, and/or left-truncated. Several built-in parametric distributions are available, including a very flexible model based on splines (Royston and Parmar).
-
Any user-defined parametric model can be employed by supplying R functions defining the distribution.
-
Covariates can be included using a (log-)linear model on any parameter of any distribution. This typically defines an accelerated failure time or proportional hazards model.
-
Multi-state models for continuously-observed data can be defined by piecing together transition-specific parametric models of any kind. (For intermittently-observed data, see instead the msm package.)
Learn more
Guide to multi-state modelling in flexsurv.
Full reference manual for all the package's functions.
Paper in Journal of Statistical Software (Jackson 2016). Mostly the same as the user guide, but not kept up to date.
Installation (stable CRAN version)
install.packages("flexsurv")
Installation (development version)
install.packages("devtools") # if devtools not already installed
devtools::install_github('chjackson/flexsurv-dev')
<!-- badges: start -->
<!-- badges: end -->Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
