A review of spline function procedures in R

BMC Medical Research Methodology - Tập 19 - Trang 1-16 - 2019
Aris Perperoglou1, Willi Sauerbrei2, Michal Abrahamowicz3, Matthias Schmid4
1Department of Mathematical Sciences, University of Essex, Colchester, UK
2Institute of Medical Biometry and Statistics, Faculty of Medicine and Medical Center, University of Freiburg, Freiburg, Germany
3McGill University Health Centre, McGill University, Montreal, Canada
4Medical Biometry, Informatics and Epidemiology, Faculty of Medicine, University of Bonn, Bonn, Germany

Tóm tắt

With progress on both the theoretical and the computational fronts the use of spline modelling has become an established tool in statistical regression analysis. An important issue in spline modelling is the availability of user friendly, well documented software packages. Following the idea of the STRengthening Analytical Thinking for Observational Studies initiative to provide users with guidance documents on the application of statistical methods in observational research, the aim of this article is to provide an overview of the most widely used spline-based techniques and their implementation in R. In this work, we focus on the R Language for Statistical Computing which has become a hugely popular statistics software. We identified a set of packages that include functions for spline modelling within a regression framework. Using simulated and real data we provide an introduction to spline modelling and an overview of the most popular spline functions. We present a series of simple scenarios of univariate data, where different basis functions are used to identify the correct functional form of an independent variable. Even in simple data, using routines from different packages would lead to different results. This work illustrate challenges that an analyst faces when working with data. Most differences can be attributed to the choice of hyper-parameters rather than the basis used. In fact an experienced user will know how to obtain a reasonable outcome, regardless of the type of spline used. However, many analysts do not have sufficient knowledge to use these powerful tools adequately and will need more guidance.

Tài liệu tham khảo

Babu GJ. Resampling methods for model fitting and model selection. J Biopharm Stat. 2011; 21:1177–86. Chambers JM, Hastie TJ. Statistical methods in S. Pacific Grove: Wadsworth & Brooks/Cole Advanced Books & Software; 1992. Cole TJ, Green PJ. Smoothing reference centile curves: the lms method and penalized likelihood. Stat Med. 1992; 11:1305–19. De Boor C. A practical guide to splines. New York: Springer-Verlag; 2001. de Vries A. On the Growth of Cran Packages, r bloggers. 2016. https://www.r-bloggers.com/on-the-growth-of-cran-packages. Dominici F, McDermott A, Zeger SL, Samet JM. On the use of generalized additive models in time-series studies of air pollution and health. Am J Epidemiol. 2002; 156:193–203. Eilers PH, Marx BD. Splines, knots, and penalties. Wiley Interdiscip Rev Comput Stat. 2010; 2:637–653. Eilers PHC, Marx BD. Flexible smoothing with B-splines and penalties. Stat Sci. 1996; 11:89–121. Friedman J, Hastie T, Tibshirani R. The elements of statistical learning. New York: Springer series in statistics; 2001. Golub GH, Heath M, Wahba G. Generalized cross-validation as a method for choosing a good ridge parameter. Technometrics. 1979; 21:215–23. Green P, Silverman B. Nonparametric regression and generalized linear models: a roughness penalty approach.Chapman and Hall; 1993. Harrell Jr FE. Regression modeling strategies: with applications to linear models, logistic and ordinal regression, and survival analysis.Springer; 2015. Hastie TJ, Tibshirani RJ. Generalized Additive Models.London: Chapman and Hall; 1990. Hastie T. gam: Generalized Additive Models. 2017. https://CRAN.R-project.org/package=gam. R package version 1.14-4. Hastie T, Tibshirani R. Generalized additive models. Stat Sci. 1986; 1:297–318. Jackson J. R Programming Language Gaining Ground on Traditional Statistics Packages. 2014. www.pcworld.com. http://www.pcworld.com/article/2480920/r-programming-language-gaining-ground-on-traditional-statistics-packages.html. Accessed 20 Feb 2019. Koenker R. quantreg: Quantile Regression. 2017. https://CRAN.R-project.org/package=quantreg. R package version 5.33. Perperoglou A, Eilers PH. Penalized regression with individual deviance effects. Comput Stat. 2010; 25:341–61. Rigby R, Stasinopoulos D, Voudouris V. Discussion: A comparison of gamlss with quantile regression. Stat Model. 2013; 13:335–48. Rigby RA, Stasinopoulos DM. Generalized additive models for location, scale and shape,(with discussion). Appl Stat. 2005; 54:507–54. Robert M. The Popularity of Data Analysis Software. 2012. http://r4stats.com/articles/popularity/. Accessed 20 Feb 2019. Over 16 years of r project history. 2016. http://blog.revolutionanalytics.com/2016/03/16-years-of-r-history.html. Accessed 20 Feb 2019. Royston P, Sauerbrei W. Multivariable model-building: a pragmatic approach to regression anaylsis based on fractional polynomials for modelling continuous variables: Wiley; 2008. Ruppert D, Wand MP, Carroll RJ. Semiparametric regression: Cambridge University Press; 2003. Sauerbrei W, Abrahamowicz M, Altman DG, le Cessie, Carpenter J. STRengthening Analytical Thinking for Observational Studies: The STRATOS initiative. Stat Med. 2014; 33:5413–32. Sauerbrei W, Buchholz A, Boulesteix A-L, Binder H. On stability issues in deriving multivariable regression models. Biom J. 2015; 57:531–55. Sauerbrei W, Royston P, Binder H. Selection of important variables and determination of functional form for continuous predictors in multivariable model building. Stat Med. 2007; 26:5512–28. Schmid M, Hothorn T. Boosting additive models using component-wise P-splines. Comput Stat Data Anal. 2008; 53(2):298–311. Shmueli G, et al.To explain or to predict?Stat Sci. 2010; 25:289–310. Smith D. New surveys show continued popularity of r. 2015. http://blog.revolutionanalytics.com/2015/11/new-surveys-show-continued-popularity-of-r.html. Accessed 20 Feb 2019. Stasinopoulos MD, Rigby RA, Heller GZ, Voudouris V, De Bastiani F. Flexible Regression and Smoothing: Using GAMLSS in R.CRC Press; 2017. Stephen C. The 2016 top programming languages. 2016. http://spectrum.ieee.org/computing/software/the-2016-top-programming-languages. Team RDC. R: A language and environment for statistical computing. Vienna: R Foundation for Statistical Computing; 2014. http://www.R-project.org. Therneau TM. A Package for Survival Analysis in S. 1999. http://www.mayo.edu/hsr/people/therneau/survival.ps. Accessed 20 Feb 2019. Therneau TM, Grambsch PM. Modeling survival data: extending the Cox model.Springer Science; 2000. Vance A. R You Ready for R You? the new york times. 2009. http://bits.blogs.nytimes.com/2009/01/08/r-you-ready-for-r/?r=0. Wahba G. Spline Models for Observational Data.SIAM; 1990. Wang Y. Smoothing splines: methods and applications: Chapman and Hall/CRC; 2011. Wood SN. Just another gibbs additive modeler: Interfacing JAGS and mgcv. J Stat Softw. 2016; 75:1–15. Wood S. Thin-plate regression splines. J R Stat Soc (B). 2003; 65:95–114. Wood SN. Generalizedadditive models: an introduction with R.Chapman and Hall/CRC; 2017. Yee TW. VGAM: Vector Generalized Linear and Additive Models. 2016. https://CRAN.R-project.org/package=VGAM. R package version 1.0-2. Yee TW, Hastie TJ. Reduced-rank vector generalized linear models. Stat Model. 2003; 3:15–41.