Learn R Programming

mgcViz (version 0.2.0)

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,612

Version

0.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Matteo Fasiolo

Last Published

April 11th, 2025

Functions in mgcViz (0.2.0)

l_coordContour

Adding coordinate lines
l_ciBar

Adding confidence intervals to barplots
l_clusterLine

Cluster and plot smooth effects
l_ciLine

Adding confidence intervals to effect plot
gridPrint

Plotting plotSmooth objects on a grid
l_gridCheck1D

Binning and checking GAM residuals
l_gridCheck2D

Binning and checking GAM residuals
l_densCheck

Checking residuals conditional density
l_fitContour

Adding fitted effect contour lines
l_points

Add points to plot
l_fitBar

Adding barplot to effect plots
l_glyphs2D

Adding glyphs to 2D plots
l_simLine

Add simulated smooth effect curves
l_vline

Adding vertical line to a plot
l_fitPoints

Adding points representing the fitted effect
l_dens2D

Adding density estimate heatmap
l_fitRaster

Adding raster representing the fitted effect
l_hist

Adding histogram to a plot
l_fitDens

Adding density strip of fitted effect
l_gridQCheck2D

Binning and checking QGAM residuals
l_fitLine

Add fitted smooth effect curve
l_gridQCheck1D

Checking sign of residuals along one covariate
l_pvRaster

Adding raster or heat-map of p-values
mqgamV

Fit multiple QGAM models and get a mgamViz object
l_poly

Add polygons to effect plots
listLayers

Lists available layers for plotSmooth objects
plot.fs.interaction.1D

Plotting one dimensional smooth factor interactions
plot.mgcv.smooth.1D

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

Plotting slice of higher-dimensional smooth effects
plot.ALE1D

Plot 1D Accumulated Local Effects (ALE)
plot.nested1D

Plotting one dimensional nested effects
plot.mrf.smooth

Plotting Markov random field smooths
l_rug

Adding rug to margins of a plot
l_pvContour

Adding contour of p-values
plot.multi.random.effect

Plotting random effects
plot.gamViz

Basic GAM plotting
plot.sos.smooth

Plotting smooths on the sphere
plotDiff.mgcv.smooth.2D

Plotting differences between two 2D smooth effects
print.plotGam

Printing the output of plot.gamViz
plot.multi.ptermFactor

Plotting factor or logical parametric effects
print.plotSmooth

Printing plots of smooth effects
plot.ptermInteraction

Plotting parametric interactions
plot.mgamViz

Plotting multiple quantile GAMs
plotRGL.mgcv.smooth.2D

Visualizing 2D smooth effects in 3D
plotRGL

Generic RGL plotting function
plotDiff.mgcv.smooth.1D

Plotting differences between two 1D smooth effects
qqplots

Quantile-Quantile Plots
plotDiff

Generic plotting of differences
qq.gamViz

QQ plots for gam model residuals
shine

Generic shine function
zoom.qqGam

Efficiently zooming on GAM QQ-plots
residuals.gamViz

Generalized Additive Model residuals
zto1

Constructing a decreasing function from (0,1) to (0,1)
print.qqGam

Printing the output of qq.gamViz
pterm

Extracting parametric effects from a GAM model
plotDiff.sos.smooth

Plotting differences between two smooths on the sphere
plot.mgcv.smooth.2D

Plotting two dimensional smooth effects
plotRGL.mgcv.smooth.MD

Visualizing a 2D slice of a smooth effects in 3D
plotSlice

Plotting sequence of slices of 2D smooth effect
qgamV

Fit a QGAM model and get a gamViz object
postSim

Posterior simulation from a GAM object
plot.ptermMatrixNumeric

Plotting numeric parametric effects
qq

Generic QQ plots
sm

Extracting a smooth effect from a GAM model
print.checkGam

Printing the output of check.gamViz
zoom

Generic zooming function
simulate.gam

Simulating responses from a GAM object
shine.qqGam

Shiny QQ-plots for GAMs
check1D

Checking GAM residuals or responses along one covariate
getGam

Convert gamViz object to gamObject
fix.family.cdf

Getting the CDF of a gam family
check2D

Checking GAM residuals along two covariates
ALE.gam

Create Accumulated Local Effects (ALE) for GAMs
check.gamViz

Some diagnostics for a fitted gam model
gamm4V

Fit a GAMM or GAMM4 model and get a gamViz object
bamV

Fit a GAM model and get a gamViz object
check0D

Checking GAM simulated residuals or responses
ALE

Generic function for Accumulated Local Effect (ALE)
l_bound

Add boundaries to smooth effect plot
l_dens1D

Adding density estimate to a plot
getViz

Converting gam objects to gamViz objects
l_ciPoly

Adding confidence band to effect plots