Learn R Programming

mgcViz (version 0.2.1)

Visualisations for Generalized Additive Models

Description

Extension of the 'mgcv' package, providing visual tools for Generalized Additive Models that exploit the additive structure of such models, scale to large data sets and can be used in conjunction with a wide range of response distributions. The focus is providing visual methods for better understanding the model output and for aiding model checking and development beyond simple exponential family regression. The graphical framework is based on the layering system provided by 'ggplot2'.

Copy Link

Version

Install

install.packages('mgcViz')

Monthly Downloads

2,746

Version

0.2.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Matteo Fasiolo

Last Published

July 4th, 2025

Functions in mgcViz (0.2.1)

l_ciLine

Adding confidence intervals to effect plot
l_ciPoly

Adding confidence band to effect plots
gridPrint

Plotting plotSmooth objects on a grid
l_clusterLine

Cluster and plot smooth effects
l_fitLine

Add fitted smooth effect curve
l_fitRaster

Adding raster representing the fitted effect
l_bound

Add boundaries to smooth effect plot
l_fitContour

Adding fitted effect contour lines
l_fitDens

Adding density strip of fitted effect
l_gridQCheck1D

Checking sign of residuals along one covariate
l_fitBar

Adding barplot to effect plots
l_simLine

Add simulated smooth effect curves
l_gridQCheck2D

Binning and checking QGAM residuals
l_vline

Adding vertical line to a plot
l_densCheck

Checking residuals conditional density
listLayers

Lists available layers for plotSmooth objects
mqgamV

Fit multiple QGAM models and get a mgamViz object
plot.mgcv.smooth.1D

Plotting one dimensional smooth effects
plot.mgcv.smooth.2D

Plotting two dimensional smooth effects
l_ciBar

Adding confidence intervals to barplots
l_rug

Adding rug to margins of a plot
l_gridCheck2D

Binning and checking GAM residuals
l_gridCheck1D

Binning and checking GAM residuals
l_pvRaster

Adding raster or heat-map of p-values
l_fitPoints

Adding points representing the fitted effect
plot.ptermMatrixNumeric

Plotting numeric parametric effects
plot.ptermInteraction

Plotting parametric interactions
l_glyphs2D

Adding glyphs to 2D plots
l_pvContour

Adding contour of p-values
plot.nested1D

Plotting one dimensional nested effects
plot.mgcv.smooth.MD

Plotting slice of higher-dimensional smooth effects
l_poly

Add polygons to effect plots
plot.multi.ptermFactor

Plotting factor or logical parametric effects
plot.mrf.smooth

Plotting Markov random field smooths
plot.mgamViz

Plotting multiple quantile GAMs
l_hist

Adding histogram to a plot
plot.gamViz

Basic GAM plotting
print.checkGam

Printing the output of check.gamViz
plotDiff.mgcv.smooth.2D

Plotting differences between two 2D smooth effects
plotDiff.sos.smooth

Plotting differences between two smooths on the sphere
postSim

Posterior simulation from a GAM object
plotRGL

Generic RGL plotting function
plot.multi.random.effect

Plotting random effects
print.plotGam

Printing the output of plot.gamViz
plot.sos.smooth

Plotting smooths on the sphere
print.plotSmooth

Printing plots of smooth effects
plotRGL.mgcv.smooth.2D

Visualizing 2D smooth effects in 3D
qgamV

Fit a QGAM model and get a gamViz object
plotDiff.mgcv.smooth.1D

Plotting differences between two 1D smooth effects
plot.ALE1D

Plot 1D Accumulated Local Effects (ALE)
plotRGL.mgcv.smooth.MD

Visualizing a 2D slice of a smooth effects in 3D
plot.fs.interaction.1D

Plotting one dimensional smooth factor interactions
l_points

Add points to plot
plotDiff

Generic plotting of differences
qq

Generic QQ plots
qq.gamViz

QQ plots for gam model residuals
plotSlice

Plotting sequence of slices of 2D smooth effect
shine.qqGam

Shiny QQ-plots for GAMs
simulate.gam

Simulating responses from a GAM object
qqplots

Quantile-Quantile Plots
zoom.qqGam

Efficiently zooming on GAM QQ-plots
zto1

Constructing a decreasing function from (0,1) to (0,1)
sm

Extracting a smooth effect from a GAM model
print.qqGam

Printing the output of qq.gamViz
residuals.gamViz

Generalized Additive Model residuals
shine

Generic shine function
pterm

Extracting parametric effects from a GAM model
zoom

Generic zooming function
check.gamViz

Some diagnostics for a fitted gam model
check0D

Checking GAM simulated residuals or responses
gamm4V

Fit a GAMM or GAMM4 model and get a gamViz object
ALE.gam

Create Accumulated Local Effects (ALE) for GAMs
ALE

Generic function for Accumulated Local Effect (ALE)
fix.family.cdf

Getting the CDF of a gam family
check2D

Checking GAM residuals along two covariates
check1D

Checking GAM residuals or responses along one covariate
bamV

Fit a GAM model and get a gamViz object
getGam

Convert gamViz object to gamObject
l_dens1D

Adding density estimate to a plot
l_coordContour

Adding coordinate lines
getViz

Converting gam objects to gamViz objects
l_dens2D

Adding density estimate heatmap