Skip to main content
Cornell University
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > stat > arXiv:2406.19082

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Statistics > Computation

arXiv:2406.19082 (stat)
[Submitted on 27 Jun 2024]

Title:Gratia: An R package for exploring generalized additive models

Authors:Gavin L. Simpson
View a PDF of the paper titled Gratia: An R package for exploring generalized additive models, by Gavin L. Simpson
View PDF HTML (experimental)
Abstract:Generalized additive models (GAMs, Hastie & Tibshirani, 1990; Wood, 2017) are an extension of the generalized linear model that allows the effects of covariates to be modelled as smooth functions. GAMs are increasingly used in many areas of science (e.g. Pedersen, Miller, Simpson, & Ross, 2019; Simpson, 2018) because the smooth functions allow nonlinear relationships between covariates and the response to be learned from the data through the use of penalized splines. Within the R (R Core Team, 2024) ecosystem, Simon Wood's mgcv package (Wood, 2017) is widely used to fit GAMs and is a Recommended package that ships with R as part of the default install. A growing number of other R packages build upon mgcv, for example as an engine to fit specialised models not handled by mgcv itself (e.g. GJMR, Marra & Radice, 2023), or to make use of the wide range of splines available in mgcv (e.g. brms, Bürkner, 2017).
The gratia package builds upon mgcv by providing functions that make working with GAMs easier. gratia takes a tidy approach (Wickham, 2014) providing ggplot2 (Wickham, 2016) replacements for mgcv's base graphics-based plots, functions for model diagnostics and exploration of fitted models, and a family of functions for drawing samples from the posterior distribution of a fitted GAM. Additional functionality is provided to facilitate the teaching and understanding of GAMs.
Comments: 9 pages, 4 figures, submitted to Journal of Open Source Software
Subjects: Computation (stat.CO); Methodology (stat.ME)
Cite as: arXiv:2406.19082 [stat.CO]
  (or arXiv:2406.19082v1 [stat.CO] for this version)
  https://doi.org/10.48550/arXiv.2406.19082
arXiv-issued DOI via DataCite
Journal reference: Journal of Open Source Software, 9(104), 2024, 6962
Related DOI: https://doi.org/10.21105/joss.06962
DOI(s) linking to related resources

Submission history

From: Gavin Simpson [view email]
[v1] Thu, 27 Jun 2024 11:08:52 UTC (4,450 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled Gratia: An R package for exploring generalized additive models, by Gavin L. Simpson
  • View PDF
  • HTML (experimental)
  • TeX Source
  • Other Formats
license icon view license
Current browse context:
stat.CO
< prev   |   next >
new | recent | 2024-06
Change to browse by:
stat
stat.ME

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack