All Projects → gavinsimpson → Gratia

gavinsimpson / Gratia

Licence: other
ggplot-based graphics and useful functions for GAMs fitted using the mgcv package

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Gratia

sportyR
R package for drawing regulation playing surfaces for several sports
Stars: ✭ 84 (-17.65%)
Mutual labels:  ggplot2, r-package
cusumcharter
Easier CUSUM control charts. Returns simple CUSUM statistics, CUSUMs with control limit calculations, and function to generate faceted CUSUM Control Charts
Stars: ✭ 17 (-83.33%)
Mutual labels:  ggplot2, r-package
ggHoriPlot
A user-friendly, highly customizable R package for building horizon plots in ggplot2
Stars: ✭ 115 (+12.75%)
Mutual labels:  ggplot2, r-package
Ggparliament
Simple parliament plots using ggplot2
Stars: ✭ 130 (+27.45%)
Mutual labels:  ggplot2, r-package
Ggextra
📊 Add marginal histograms to ggplot2, and more ggplot2 enhancements
Stars: ✭ 299 (+193.14%)
Mutual labels:  ggplot2, r-package
Ggdist
Visualizations of distributions and uncertainty
Stars: ✭ 197 (+93.14%)
Mutual labels:  ggplot2, r-package
mapr
Map species occurrence data
Stars: ✭ 34 (-66.67%)
Mutual labels:  ggplot2, r-package
Plotly
An interactive graphing library for R
Stars: ✭ 2,096 (+1954.9%)
Mutual labels:  ggplot2, r-package
Ggpointdensity
📈 📊 Introduces geom_pointdensity(): A Cross Between a Scatter Plot and a 2D Density Plot.
Stars: ✭ 286 (+180.39%)
Mutual labels:  ggplot2, r-package
Bayesplot
bayesplot R package for plotting Bayesian models
Stars: ✭ 276 (+170.59%)
Mutual labels:  ggplot2, r-package
TDAstats
R pipeline for computing persistent homology in topological data analysis. See https://doi.org/10.21105/joss.00860 for more details.
Stars: ✭ 26 (-74.51%)
Mutual labels:  ggplot2, r-package
Tidybayes
Bayesian analysis + tidy data + geoms (R package)
Stars: ✭ 557 (+446.08%)
Mutual labels:  ggplot2, r-package
jcolors
A set of color palettes I like (or can at least tolerate)
Stars: ✭ 24 (-76.47%)
Mutual labels:  ggplot2, r-package
Naniar
Tidy data structures, summaries, and visualisations for missing data
Stars: ✭ 557 (+446.08%)
Mutual labels:  ggplot2, r-package
Tidymv
Tidy Model Visualisation for Generalised Additive Models
Stars: ✭ 25 (-75.49%)
Mutual labels:  ggplot2, r-package
Evaluate
A version of eval for R that returns more information about what happened
Stars: ✭ 88 (-13.73%)
Mutual labels:  r-package
Ggplotnim
A port of ggplot2 for Nim
Stars: ✭ 95 (-6.86%)
Mutual labels:  ggplot2
R Bridge
Bridge library to connect ArcGIS and R, including arcgisbinding R library.
Stars: ✭ 87 (-14.71%)
Mutual labels:  r-package
Tabr
R package: tabr. Notation-based and tidy music data analysis and transcription.
Stars: ✭ 87 (-14.71%)
Mutual labels:  r-package
Ggbernie
A ggplot2 geom for adding Bernie Sanders to ggplot2
Stars: ✭ 96 (-5.88%)
Mutual labels:  ggplot2

gratia

R build status Build status codecov.io CRAN_Status_Badge

Overview

Graceful ‘ggplot’-based graphics and utility functions for working with generalized additive models (GAMs) fitted using the ‘mgcv’ package. Provides a reimplementation of the plot() method for GAMs that ‘mgcv’ provides, as well as ‘tidyverse’ compatible representations of estimated smooths.

Features

The main features of gratia are currently

  • A ggplot2-based replacement for mgcv:::plot.gam(): draw(gam_model).

    For example, the classic four term additive example from Gu & Wahba:

    Estimated smooths from a GAM

    Or for a bivariate smooth:

    Estimated smooths from a GAM

    Note specialist smoothers (bs %in% c("sos","mrf","so")) are not currently supported, but univariate, factor and continuous by-variable smooths, simple random effect smooths (bs = 're'), factor-smooth interaction smooths (bs = "fs"), and bivariate tensor product smooths are supported,

  • Estimatation of derivatives of fitted smoothers: derivatives() (older functionality in fderiv(gam_model)),

  • Estimation of point-wise across-the-function confidence intervals and simultaneous intervals for smooths: confint(gam_model).

  • Model diagnostics via appraise()

    Model diagnostics figure

Installing gratia

gratia is now available on CRAN, and can be installed with

install.packages('gratia')

however gratia is under active development and you may wish to install the development version from github. The easiest way to do this is via the install_github() function from package remotes. Make sure you have remotes installed, then run

remotes::install_github("gavinsimpson/gratia")

to install the package.

History

gratia grew out of an earlier package, schoenberg, itself a development of the earlier package tsgam, which was originally intended to be used with GAMs fitted to time series. As I was developing tsgam however it became clear that the package could be used more generally and that the name “tsgam” was no longer appropriate. To avoid breaking blog posts I had written using tsgam I decided to copy the git repo and all the history to a new repo for the package under the name schoenberg. At a later date someone released another package called schoenberg to CRAN, so that scuppered that idea. Now I’m calling the package gratia. Hopefully I won’t have to change it again…

Why gratia?

In naming his greta package, Nick Golding observed the recent phenomena of naming statistical modelling software, such as Stan or Edward, after individuals that played a prominent role in the development of the field. This lead Nick to name his Tensor Flow-based package greta after Grete Hermann.

In the same spirit, gratia is named in recognition of the contributions of Grace Wahba, who did pioneering work on the penalised spline models that are at the foundation of the way GAMs are estimated in mgcv. I wanted to name the package grace, to explicitly recognise Grace’s contributions, but unfortunately there was already a package named Grace on CRAN. So I looked elsewhere for inspiration.

The English word “grace” derives from the Latin gratia, meaning “favor, charm, thanks” (according to Merriam Webster).

The chair that Grace Wabha currently holds is named after Isaac J Schoenberg, a former University Madison-Wisconsin Professor of Mathematics, who in a 1946 paper provided the first mathematical reference to “splines”. (Hence the previous name for the package.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].