IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v070i08.html
   My bibliography  Save this article

flexsurv: A Platform for Parametric Survival Modeling in R

Author

Listed:
  • Jackson, Christopher

Abstract

flexsurv is an R package for fully-parametric modeling of survival data. Any parametric time-to-event distribution may be fitted if the user supplies a probability density or hazard function, and ideally also their cumulative versions. Standard survival distributions are built in, including the three and four-parameter generalized gamma and F distributions. Any parameter of any distribution can be modeled as a linear or log-linear function of covariates. The package also includes the spline model of Royston and Parmar (2002), in which both baseline survival and covariate effects can be arbitrarily flexible parametric functions of time. The main model-fitting function, flexsurvreg, uses the familiar syntax of survreg from the standard survival package (Therneau 2016). Censoring or left-truncation are specified in 'Surv' objects. The models are fitted by maximizing the full log-likelihood, and estimates and confidence intervals for any function of the model parameters can be printed or plotted. flexsurv also provides functions for fitting and predicting from fully-parametric multi-state models, and connects with the mstate package (de Wreede, Fiocco, and Putter 2011). This article explains the methods and design principles of the package, giving several worked examples of its use.

Suggested Citation

  • Jackson, Christopher, 2016. "flexsurv: A Platform for Parametric Survival Modeling in R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 70(i08).
  • Handle: RePEc:jss:jstsof:v:070:i08
    DOI: http://hdl.handle.net/10.18637/jss.v070.i08
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v070i08/v70i08.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v070i08/flexsurv_1.0.0.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v070i08/v70i08.R
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v070.i08?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Jackson, Christopher, 2011. "Multi-State Models for Panel Data: The msm Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 38(i08).
    2. W. Sauerbrei & P. Royston, 1999. "Building multivariable prognostic and diagnostic models: transformation of the predictors by using fractional polynomials," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 162(1), pages 71-94.
    3. Micha Mandel, 2013. "Simulation-Based Confidence Intervals for Functions With Complicated Derivatives," The American Statistician, Taylor & Francis Journals, vol. 67(2), pages 76-81, May.
    4. Patrick Royston & Paul C. Lambert, 2011. "Flexible Parametric Survival Analysis Using Stata: Beyond the Cox Model," Stata Press books, StataCorp LP, number fpsaus, March.
    5. Patrick Royston & Douglas G. Altman, 1994. "Regression Using Fractional Polynomials of Continuous Covariates: Parsimonious Parametric Modelling," Journal of the Royal Statistical Society Series C, Royal Statistical Society, vol. 43(3), pages 429-453, September.
    6. de Wreede, Liesbeth C. & Fiocco, Marta & Putter, Hein, 2011. "mstate: An R Package for the Analysis of Competing Risks and Multi-State Models," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 38(i07).
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Daniel Gallacher & Peter Kimani & Nigel Stallard, 2021. "Extrapolating Parametric Survival Models in Health Technology Assessment: A Simulation Study," Medical Decision Making, , vol. 41(1), pages 37-50, January.
    2. Marije E. Hagendijk & Simon Schans & Cornelis Boersma & Maarten J. Postma & Simon Pol, 2021. "Economic evaluation of orphan drug Lutetium-Octreotate vs. Octreotide long-acting release for patients with an advanced midgut neuroendocrine tumour in the Netherlands," The European Journal of Health Economics, Springer;Deutsche Gesellschaft für Gesundheitsökonomie (DGGÖ), vol. 22(6), pages 991-999, August.
    3. Daniel Gallacher & Peter Kimani & Nigel Stallard, 2021. "Extrapolating Parametric Survival Models in Health Technology Assessment Using Model Averaging: A Simulation Study," Medical Decision Making, , vol. 41(4), pages 476-484, May.
    4. Kangho Suh & Brian J. Cole & Andreas Gomoll & Seung-Mi Lee & Hangseok Choi & Chul-Won Ha & Hong Chul Lim & Myung Ku Kim & Gwi-Yeom Ha & Dong-Churl Suh, 2023. "Cost Effectiveness of Allogeneic Umbilical Cord Blood-Derived Mesenchymal Stem Cells in Patients with Knee Osteoarthritis," Applied Health Economics and Health Policy, Springer, vol. 21(1), pages 141-152, January.
    5. Michael Crowther & Paul Lambert, 2016. "Multistate survival analysis in Stata," United Kingdom Stata Users' Group Meetings 2016 02, Stata Users Group.
    6. Carmen María Yago & Francisco Javier Díez, 2023. "DESnets: A Graphical Representation for Discrete Event Simulation and Cost-Effectiveness Analysis," Mathematics, MDPI, vol. 11(7), pages 1-24, March.
    7. María del Mar Rueda & Sergio Martínez-Puertas & Luis Castro-Martín, 2022. "Methods to Counter Self-Selection Bias in Estimations of the Distribution Function and Quantiles," Mathematics, MDPI, vol. 10(24), pages 1-19, December.
    8. Szilárd Nemes & Erik Bülow & Andreas Gustavsson, 2020. "A Brief Overview of Restricted Mean Survival Time Estimators and Associated Variances," Stats, MDPI, vol. 3(2), pages 1-13, May.
    9. Fuino, Michel & Wagner, Joël, 2020. "Duration of long-term care: Socio-economic factors, type of care interactions and evolution," Insurance: Mathematics and Economics, Elsevier, vol. 90(C), pages 151-168.
    10. Michał Narajewski & Florian Ziel, 2019. "Estimation and Simulation of the Transaction Arrival Process in Intraday Electricity Markets," Energies, MDPI, vol. 12(23), pages 1-16, November.
    11. Sharples, Linda D., 2018. "The role of statistics in the era of big data: Electronic health records for healthcare research," Statistics & Probability Letters, Elsevier, vol. 136(C), pages 105-110.
    12. Pier-Olivier Tremblay & Thierry Duchesne & Steven G Cumming, 2018. "Survival analysis and classification methods for forest fire size," PLOS ONE, Public Library of Science, vol. 13(1), pages 1-16, January.
    13. Caitlin Eichten & Qiufei Ma & Thomas E. Delea & May Hagiwara & Roberto Ramos & Şerban R. Iorga & Jie Zhang & Richard T. Maziarz, 2021. "Lifetime Costs for Treated Follicular Lymphoma Patients in the US," PharmacoEconomics, Springer, vol. 39(10), pages 1163-1183, October.
    14. Elizabeth G Bond & Lusine Abrahamyan & Mohammad K A Khan & Andrea Gershon & Murray Krahn & Ping Li & Rajibul Mian & Nicholas Mitsakakis & Mohsen Sadatsafavi & Teresa To & Petros Pechlivanoglou & for t, 2020. "Understanding resource utilization and mortality in COPD to support policy making: A microsimulation study," PLOS ONE, Public Library of Science, vol. 15(8), pages 1-16, August.
    15. Burger, Rulof & Ito, Seiro, 2016. "Labour market turnovers among South African youths," IDE Discussion Papers 603, Institute of Developing Economies, Japan External Trade Organization(JETRO).
    16. Gabrielle Jongeneel & Marjolein J. E. Greuter & Felice N. Erning & Miriam Koopman & Jan P. Medema & Raju Kandimalla & Ajay Goel & Luis Bujanda & Gerrit A. Meijer & Remond J. A. Fijneman & Martijn G. H, 2020. "Modeling Personalized Adjuvant TreaTment in EaRly stage coloN cancer (PATTERN)," The European Journal of Health Economics, Springer;Deutsche Gesellschaft für Gesundheitsökonomie (DGGÖ), vol. 21(7), pages 1059-1073, September.
    17. I. Oostrum & T. A. Russell-Smith & M. Jakobsson & J. Torup Østby & B. Heeg, 2022. "Cost-Effectiveness of Inotuzumab Ozogamicin Compared to Standard of Care Chemotherapy for Treating Relapsed or Refractory Acute Lymphoblastic Leukaemia Patients in Norway and Sweden," PharmacoEconomics - Open, Springer, vol. 6(1), pages 47-62, January.
    18. Suvra Pal & Hongbo Yu & Zachary D. Loucks & Ian M. Harris, 2020. "Illustration of the Flexibility of Generalized Gamma Distribution in Modeling Right Censored Survival Data: Analysis of Two Cancer Datasets," Annals of Data Science, Springer, vol. 7(1), pages 77-90, March.
    19. Lauren Scott & Chris Rogers, 2016. "Creating summary tables using the sumtable command," United Kingdom Stata Users' Group Meetings 2016 05, Stata Users Group.
    20. Machado, Robson J.M. & van den Hout, Ardo & Marra, Giampiero, 2021. "Penalised maximum likelihood estimation in multi-state models for interval-censored data," Computational Statistics & Data Analysis, Elsevier, vol. 153(C).
    21. Francesco Grossetti & Francesca Ieva & Anna Maria Paganoni, 2018. "A multi-state approach to patients affected by chronic heart failure," Health Care Management Science, Springer, vol. 21(2), pages 281-291, June.
    22. Camarda, Carlo Giovanni, 2022. "The curse of the plateau. Measuring confidence in human mortality estimates at extreme ages," Theoretical Population Biology, Elsevier, vol. 144(C), pages 24-36.
    23. Jodi Gray & Thomas Sullivan & Nicholas R. Latimer & Amy Salter & Michael J. Sorich & Robyn L. Ward & Jonathan Karnon, 2021. "Extrapolation of Survival Curves Using Standard Parametric Models and Flexible Parametric Spline Models: Comparisons in Large Registry Cohorts with Advanced Cancer," Medical Decision Making, , vol. 41(2), pages 179-193, February.
    24. Linh Hoang Khanh Dang & Carlo Giovanni Camarda & France Meslé & Nadine Ouellette & Jean-Marie Robine & Jacques Vallin, 2023. "The question of the human mortality plateau: Contrasting insights by longevity pioneers," Demographic Research, Max Planck Institute for Demographic Research, Rostock, Germany, vol. 48(11), pages 321-338.
    25. Philip Cooney & Arthur White, 2023. "Direct Incorporation of Expert Opinion into Parametric Survival Models to Inform Survival Extrapolation," Medical Decision Making, , vol. 43(3), pages 325-336, April.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Touraine, Célia & Gerds, Thomas A. & Joly, Pierre, 2017. "SmoothHazard: An R Package for Fitting Regression Models to Interval-Censored Observations of Illness-Death Models," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 79(i07).
    2. Marisa Rifada & Vita Ratnasari & Purhadi Purhadi, 2023. "Parameter Estimation and Hypothesis Testing of The Bivariate Polynomial Ordinal Logistic Regression Model," Mathematics, MDPI, vol. 11(3), pages 1-12, January.
    3. Patrick Royston, 2012. "Tools to simulate realistic censored survival-time distributions," Stata Journal, StataCorp LP, vol. 12(4), pages 639-654, December.
    4. Sharples, Linda D., 2018. "The role of statistics in the era of big data: Electronic health records for healthcare research," Statistics & Probability Letters, Elsevier, vol. 136(C), pages 105-110.
    5. Noori Akhtar-Danesh, 2015. "A Comparison of Modeling Scales in Flexible Parametric Models," 2015 Stata Conference 15, Stata Users Group.
    6. Sauerbrei, W. & Meier-Hirmer, C. & Benner, A. & Royston, P., 2006. "Multivariable regression model building by using fractional polynomials: Description of SAS, STATA and R programs," Computational Statistics & Data Analysis, Elsevier, vol. 50(12), pages 3464-3485, August.
    7. Sauerbrei, Willi & Royston, Patrick & Zapien, Karina, 2007. "Detecting an interaction between treatment and a continuous covariate: A comparison of two approaches," Computational Statistics & Data Analysis, Elsevier, vol. 51(8), pages 4054-4063, May.
    8. William D. Dupont, 2010. "Review of Multivariable Model-building: A Pragmatic Approach to Regression Analysis Based on Fractional Polynomials for Modeling Continuous Variables, by Royston and Sauerbrei," Stata Journal, StataCorp LP, vol. 10(2), pages 297-302, June.
    9. Budhi Surya, 2021. "A new class of conditional Markov jump processes with regime switching and path dependence: properties and maximum likelihood estimation," Papers 2107.07026, arXiv.org.
    10. Royston, P. & Sauerbrei, W., 2007. "Improving the robustness of fractional polynomial models by preliminary covariate transformation: A pragmatic approach," Computational Statistics & Data Analysis, Elsevier, vol. 51(9), pages 4240-4253, May.
    11. Francesco Grossetti & Francesca Ieva & Anna Maria Paganoni, 2018. "A multi-state approach to patients affected by chronic heart failure," Health Care Management Science, Springer, vol. 21(2), pages 281-291, June.
    12. Soini, Vesa & Lorentzen, Sindre, 2019. "Option prices and implied volatility in the crude oil market," Energy Economics, Elsevier, vol. 83(C), pages 515-539.
    13. Ardo Hout & Graciela Muniz-Terrera, 2019. "Hidden three-state survival model for bivariate longitudinal count data," Lifetime Data Analysis: An International Journal Devoted to Statistical Methods and Applications for Time-to-Event Data, Springer, vol. 25(3), pages 529-545, July.
    14. Patrick Royston & Willi Sauerbrei, 2009. "Two techniques for investigating interactions between treatment and continuous covariates in clinical trials," Stata Journal, StataCorp LP, vol. 9(2), pages 230-251, June.
    15. Charles-Olivier Amédée-Manesme & Fabrice Barthélémy & Didier Maillard, 2019. "Computation of the corrected Cornish–Fisher expansion using the response surface methodology: application to VaR and CVaR," Annals of Operations Research, Springer, vol. 281(1), pages 423-453, October.
    16. Geweke, John & Petrella, Lea, 2014. "Likelihood-based inference for regular functions with fractional polynomial approximations," Journal of Econometrics, Elsevier, vol. 183(1), pages 22-30.
    17. Blaser, Nello & Vizcaya, Luisa Salazar & Estill, Janne & Zahnd, Cindy & Kalesan, Bindu & Egger, Matthias & Gsponer, Thomas & Keiser, Olivia, 2015. "gems: An R Package for Simulating from Disease Progression Models," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 64(i10).
    18. Król, Agnieszka & Saint-Pierre, Philippe, 2015. "SemiMarkov: An R Package for Parametric Estimation in Multi-State Semi-Markov Models," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 66(i06).
    19. Piccarreta, Raffaella & Bonetti, Marco, 2019. "Assessing and comparing models for sequence data by microsimulation (with Supplementary Material)," SocArXiv 3mcfp, Center for Open Science.
    20. Farber, Steven & Li, Xiao, 2013. "Urban sprawl and social interaction potential: an empirical analysis of large metropolitan regions in the United States," Journal of Transport Geography, Elsevier, vol. 31(C), pages 267-277.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:070:i08. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.