gratia review
A focused R toolkit for visualizing, diagnosing and comparing GAM smooths.
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
For analysts working with generalized additive models in R, gratia provides tools to explore and visualize fitted GAMs, primarily models fitted using mgcv. It is aimed at people who need more than a model fit: its functions cover smooth-term plots, derivatives, confidence intervals, posterior samples and diagnostics. The package is open source and supports Windows, macOS and Linux. This focus makes it relevant to R users comparing GAM smooths, but not a replacement for a general-purpose statistical analysis environment.
Its strongest fit is the GAM workflow around smooth terms. Gratia produces ggplot2-based plots and tidyverse-compatible representations of estimated smooths, and it can calculate point-wise and simultaneous confidence intervals. Analysts can also estimate smooth-term derivatives, generate posterior samples, extract fitted values, residuals and model terms, and create diagnostic plots for fitted models. Functions for comparing smooths across models extend the package beyond inspecting a single fit. These features make it useful when interpretation and comparison of GAM terms are central to an analysis, rather than broad statistical testing across many model types.
The ecosystem fit is specifically R, with integrations for mgcv, ggplot2 and tidyverse. Gratia is a package to add to an R-based analysis workflow, not a standalone hosted service, so it suits users already working with R and GAMs better than teams seeking a separate point-and-click statistics product. Its open-source model and documentation and community support channels are relevant to adoption; the package's narrow focus is also its main boundary. Choose gratia for GAM smooth exploration, derivatives, diagnostics and model comparisons in R. Choose a broader statistical suite if your primary need is analysis beyond GAM workflows.
gratia pros and cons
- Where it wins
- Plots estimated GAM smooths with ggplot2-based graphics
- Supports derivatives, confidence intervals and posterior samples
- Compares smooths across models and creates diagnostic plots
- Where it doesn't
- Focused on GAM workflows rather than general-purpose statistics
- Works as an R package, not a standalone hosted analysis service
- Primarily targets models fitted with mgcv
gratia fact sheet, pricing and score →
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update