mgcv: Mixed GAM Computation Vehicle with GCV/AIC/REML Smoothness Estimation

GAMs, GAMMs and other generalized ridge regression with multiple smoothing parameter estimation by GCV, REML or UBRE/AIC. Includes a gam() function, a wide variety of smoothers, JAGS support and distributions beyond the exponential family.

AuthorSimon Wood <>
Date of publication2017-02-08 21:30:16
MaintainerSimon Wood <>
LicenseGPL (>= 2)

View on CRAN

Man pages

anova.gam: Approximate hypothesis tests related to GAM fits

bam: Generalized additive models for very large datasets

bam.update: Update a strictly additive bam model for new data.

bandchol: Choleski decomposition of a band diagonal matrix

Beta: GAM beta regression family

bug.reports.mgcv: Reporting mgcv bugs.

choose.k: Basis dimension choice for smooths

columb: Reduced version of Columbus OH crime data

concurvity: GAM concurvity measures

coxph: Additive Cox Proportional Hazard Model

coxpht: Additive Cox proportional hazard models with time varying...

cSplineDes: Evaluate cyclic B spline basis

exclude.too.far: Exclude prediction grid points too far from data

extract.lme.cov: Extract the data covariance matrix from an lme object

family.mgcv: Distribution families in mgcv

fixDependence: Detect linear dependencies of one matrix on another Modify families for use in GAM fitting and checking

formula.gam: GAM formula

formXtViX: Form component of GAMM covariance matrix

fs.test: FELSPLINE test function

full.score: GCV/UBRE score for use within nlm

gam: Generalized additive models with integrated smoothness...

gam2objective: Objective functions for GAM smoothing parameter estimation

gam.check: Some diagnostics for a fitted gam model

gam.control: Setting GAM fitting defaults

gam.convergence: GAM convergence and performance issues GAM P-IRLS estimation with GCV/UBRE smoothness estimation

gam.fit3: P-IRLS GAM estimation with GCV & UBRE/AIC or RE/ML derivative...

gamlss.etamu: Transform derivatives wrt mu to derivatives wrt linear...

gamlss.gH: Calculating derivatives of log-likelihood wrt regression...

gamm: Generalized Additive Mixed Models

gam.models: Specifying generalized additive models

gamObject: Fitted gam object

gam.outer: Minimize GCV or UBRE score of a GAM using 'outer' iteration

gam.scale: Scale parameter estimation in GAMs

gam.selection: Generalized Additive Model Selection

gam.side: Identifiability side conditions for a GAM

gamSim: Simulate example data for GAMs

gam.vcomp: Report gam smoothness estimates as variance components

gaulss: Gaussian location-scale model family

get.var: Get named variable or evaluate expression from list or...

gevlss: Generalized Extreme Value location-scale model family

identifiability: Identifiability constraints

influence.gam: Extract the diagonal of the influence/hat matrix for a GAM

initial.sp: Starting values for multiple smoothing parameter estimation

in.out: Which of a set of points lie within a polygon defined region

inSide: Are points inside boundary?

interpret.gam: Interpret a GAM formula

jagam: Just Another Gibbs Additive Modeller: JAGS support for mgcv.

ldTweedie: Log Tweedie density evaluation

linear.functional.terms: Linear functionals of a smooth in GAMs

logLik.gam: Log likelihood for a fitted GAM, for AIC

ls.size: Size of list elements

magic: Stable Multiple Smoothing Parameter Estimation by GCV or UBRE Auxilliary information from magic fit

mgcv-FAQ: Frequently Asked Questions for package mgcv

mgcv-package: Mixed GAM Computation Vehicle with GCV/AIC/REML smoothness...

mgcv-parallel: Parallel computation in mgcv. Missing data in GAMs

model.matrix.gam: Extract model matrix from GAM fit

mono.con: Monotonicity constraints for a cubic regression spline

mroot: Smallest square root of matrix

multinom: GAM multinomial logistic regression

mvn: Multivariate normal additive models

negbin: GAM negative binomial families Obtain a name for a new variable that is not already in use

notExp: Functions for better-than-log positive parameterization

notExp2: Alternative to log parameterization for variance components The basis of the space of un-penalized functions for a TPRS

ocat: GAM ordered categorical family The one standard error rule for smoother models

pcls: Penalized Constrained Least Squares Fitting

pdIdnot: Overflow proof pdMat class for multiples of the identity...

pdTens: Functions implementing a pdMat class for tensor product...

pen.edf: Extract the effective degrees of freedom associated with each...

place.knots: Automatically place a set of knots evenly through covariate...

plot.gam: Default GAM plotting

polys.plot: Plot geographic regions defined as polygons

predict.bam: Prediction from fitted Big Additive Model model

predict.gam: Prediction from fitted GAM model

Predict.matrix: Prediction methods for smooth terms in a GAM Predict matrix method functions Prediction matrix for soap film smooth

print.gam: Print a Generalized Additive Model object.

qq.gam: QQ plots for gam model residuals

random.effects: Random effects in GAMs

residuals.gam: Generalized Additive Model residuals

rig: Generate inverse Gaussian random deviates

rmvn: Generate multivariate normal deviates

Rrank: Find rank of upper triangular matrix

rTweedie: Generate Tweedie random deviates

s: Defining smooths in GAM formulae

scat: GAM scaled t family for heavy tailed data

sdiag: Extract or modify diagonals of a matrix

single.index: Single index models with mgcv

slanczos: Compute truncated eigen decomposition of a symmetric matrix

smooth2random: Convert a smooth to a form suitable for estimating as random...

smoothCon: Prediction/Construction wrapper functions for GAM smooth...

smooth.construct: Constructor functions for smooth terms in a GAM Adaptive smooths in GAMs Penalized B-splines in GAMs Penalized Cubic regression splines in GAMs

smooth.construct.ds.smooth.spec: Low rank Duchon 1977 splines

smooth.construct.fs.smooth.spec: Factor smooth interactions in GAMs Low rank Gaussian process smooths

smooth.construct.mrf.smooth.spec: Markov Random Field Smooths P-splines in GAMs Simple random effects in GAMs Soap film smoother constructer

smooth.construct.sos.smooth.spec: Splines on the sphere

smooth.construct.t2.smooth.spec: Tensor product smoothing constructor

smooth.construct.tensor.smooth.spec: Tensor product smoothing constructor Penalized thin plate regression splines in GAMs

smooth.terms: Smooth terms in GAM

spasm.construct: Experimental sparse smoothers

sp.vcov: Extract smoothing parameter estimator covariance matrix from...

step.gam: Alternatives to step.gam

summary.gam: Summary for a GAM fit

t2: Define alternative tensor product smooths in GAM formulae

te: Define tensor product smooths or tensor product interactions... Utility functions for constructing tensor product smooths

trichol: Choleski decomposition of a tri-diagonal matrix

trind.generator: Generates index arrays for upper triangular storage

Tweedie: GAM Tweedie families

uniquecombs: find the unique rows in a matrix

vcov.gam: Extract parameter (estimator) covariance matrix from GAM fit

vis.gam: Visualization of GAM objects

ziP: GAM zero-inflated Poisson regression family

ziplss: Zero inflated Poisson location-scale model family


adaptive.smooth Man page
AIC.gam Man page
anova.gam Man page
bam Man page
bam.update Man page
bandchol Man page
betar Man page
b.spline Man page
bug.reports.mgcv Man page
choose.k Man page
coef.pdIdnot Man page
coef.pdTens Man page
columb Man page
columb.polys Man page
concurvity Man page
corMatrix.pdIdnot Man page Man page
cox.pht Man page
cSplineDes Man page
cubic.regression.spline Man page
cyclic.cubic.spline Man page
cyclic.p.spline Man page
Dim.pdIdnot Man page
Duchon.spline Man page
exclude.too.far Man page
extract.lme.cov Man page
extract.lme.cov2 Man page
factor.smooth.interaction Man page
family.mgcv Man page
fixDependence Man page Man page Man page Man page Man page Man page
formula.gam Man page
formXtViX Man page
fs.boundary Man page
fs.test Man page
full.score Man page
function.predictors Man page
gam Man page
gam2derivative Man page
gam2objective Man page
gam.check Man page
gam.control Man page
gam.convergence Man page Man page
gam.fit3 Man page
gamlss.etamu Man page
gamlss.gH Man page
gamm Man page
gam.models Man page
gamObject Man page
gam.outer Man page
gam.performance Man page
gam.scale Man page
gam.selection Man page
gam.side Man page
gamSim Man page
gam.vcomp Man page
gaulss Man page
get.var Man page
gevlss Man page
gp.smooth Man page
identifiability Man page
influence.gam Man page
initial.sp Man page
in.out Man page
inSide Man page
interpret.gam Man page
jagam Man page
ldTweedie Man page
linear.functional.terms Man page
logDet.pdIdnot Man page
logLik.gam Man page
ls.size Man page
magic Man page Man page
mgcv Man page
mgcv.FAQ Man page
mgcv-package Man page
mgcv.package Man page
mgcv.parallel Man page Man page
model.matrix.gam Man page
mono.con Man page
mrf Man page
mroot Man page
multinom Man page
mvn Man page
nb Man page
negbin Man page Man page
notExp Man page
notExp2 Man page
notLog Man page
notLog2 Man page Man page
ocat Man page Man page
ordered.categorical Man page
pcls Man page
pdConstruct.pdIdnot Man page
pdConstruct.pdTens Man page
pdFactor.pdIdnot Man page
pdFactor.pdTens Man page
pdIdnot Man page
pdMatrix.pdIdnot Man page
pdMatrix.pdTens Man page
pdTens Man page
pen.edf Man page
persp.gam Man page
place.knots Man page
plot.gam Man page
polys.plot Man page
predict.bam Man page
predict.gam Man page
PredictMat Man page
Predict.matrix Man page
Predict.matrix2 Man page
Predict.matrix.Bspline.smooth Man page Man page
Predict.matrix.cs.smooth Man page
Predict.matrix.cyclic.smooth Man page
Predict.matrix.duchon.spline Man page
Predict.matrix.fs.interaction Man page Man page
Predict.matrix.mrf.smooth Man page
Predict.matrix.pspline.smooth Man page
Predict.matrix.random.effect Man page
Predict.matrix.sf Man page Man page
Predict.matrix.sos.smooth Man page
Predict.matrix.sw Man page
Predict.matrix.t2.smooth Man page
Predict.matrix.tensor.smooth Man page
Predict.matrix.tprs.smooth Man page
Predict.matrix.ts.smooth Man page
print.anova.gam Man page
print.gam Man page
print.summary.gam Man page
p.spline Man page
qq.gam Man page
random.effects Man page
residuals.gam Man page
rig Man page
rmvn Man page
Rrank Man page
rTweedie Man page
s Man page
scat Man page
sdiag Man page
sdiag<- Man page
signal.regression Man page
sim2jam Man page
single.index Man page
slanczos Man page
smooth2random Man page
smoothCon Man page
smooth.construct Man page
smooth.construct2 Man page Man page Man page Man page
smooth.construct.cp.smooth.spec Man page Man page
smooth.construct.cs.smooth.spec Man page
smooth.construct.ds.smooth.spec Man page
smooth.construct.fs.smooth.spec Man page Man page
smooth.construct.mrf.smooth.spec Man page Man page Man page
smooth.construct.sf.smooth.spec Man page Man page
smooth.construct.sos.smooth.spec Man page
smooth.construct.sw.smooth.spec Man page
smooth.construct.t2.smooth.spec Man page
smooth.construct.tensor.smooth.spec Man page Man page
smooth.construct.ts.smooth.spec Man page
smooth.terms Man page
soap Man page
solve.pdIdnot Man page
spasm.construct Man page
spasm.smooth Man page
spasm.sp Man page
Spherical.Spline Man page
sp.vcov Man page
step.gam Man page
summary.gam Man page
summary.pdIdnot Man page
summary.pdTens Man page
t2 Man page
te}\alias{ti Man page Man page Man page
tprs Man page
trichol Man page
trind.generator Man page
t.scaled Man page
tw Man page
Tweedie Man page
uniquecombs Man page
user.defined.smooth Man page
vcov.gam Man page
vis.gam Man page
ziP Man page
ziplss Man page


mgcv/man/notExp2.Rd mgcv/man/gamSim.Rd mgcv/man/ldTweedie.Rd mgcv/man/spasm.construct.Rd mgcv/man/te.Rd mgcv/man/gam2objective.Rd mgcv/man/step.gam.Rd mgcv/man/inSide.Rd mgcv/man/qq.gam.Rd mgcv/man/mgcv-package.Rd mgcv/man/notExp.Rd mgcv/man/sdiag.Rd mgcv/man/fixDependence.Rd mgcv/man/gam.control.Rd mgcv/man/linear.functional.terms.Rd mgcv/man/cSplineDes.Rd mgcv/man/formXtViX.Rd mgcv/man/ls.size.Rd mgcv/man/trind.generator.Rd mgcv/man/full.score.Rd mgcv/man/model.matrix.gam.Rd mgcv/man/gam.side.Rd mgcv/man/smooth.construct.tensor.smooth.spec.Rd mgcv/man/slanczos.Rd mgcv/man/vcov.gam.Rd mgcv/man/ mgcv/man/magic.Rd mgcv/man/pcls.Rd mgcv/man/residuals.gam.Rd mgcv/man/in.out.Rd mgcv/man/multinom.Rd mgcv/man/ mgcv/man/columb.Rd mgcv/man/smooth.terms.Rd mgcv/man/gamm.Rd mgcv/man/smooth2random.Rd mgcv/man/gam.selection.Rd mgcv/man/mono.con.Rd mgcv/man/Tweedie.Rd mgcv/man/ mgcv/man/trichol.Rd mgcv/man/concurvity.Rd mgcv/man/anova.gam.Rd mgcv/man/jagam.Rd mgcv/man/fs.test.Rd mgcv/man/gam.scale.Rd mgcv/man/gam.outer.Rd mgcv/man/family.mgcv.Rd mgcv/man/ mgcv/man/gam.models.Rd mgcv/man/ mgcv/man/smooth.construct.Rd mgcv/man/interpret.gam.Rd mgcv/man/ mgcv/man/gamlss.etamu.Rd mgcv/man/summary.gam.Rd mgcv/man/vis.gam.Rd mgcv/man/predict.bam.Rd mgcv/man/pdTens.Rd mgcv/man/ mgcv/man/t2.Rd mgcv/man/smooth.construct.sos.smooth.spec.Rd mgcv/man/pdIdnot.Rd mgcv/man/ mgcv/man/identifiability.Rd mgcv/man/smooth.construct.ds.smooth.spec.Rd mgcv/man/bam.update.Rd mgcv/man/single.index.Rd mgcv/man/plot.gam.Rd mgcv/man/ mgcv/man/place.knots.Rd mgcv/man/bandchol.Rd mgcv/man/scat.Rd mgcv/man/ mgcv/man/extract.lme.cov.Rd mgcv/man/ mgcv/man/gam.fit3.Rd mgcv/man/rTweedie.Rd mgcv/man/Rrank.Rd mgcv/man/mroot.Rd mgcv/man/get.var.Rd mgcv/man/rig.Rd mgcv/man/ mgcv/man/predict.gam.Rd mgcv/man/Predict.matrix.Rd mgcv/man/bam.Rd mgcv/man/coxph.Rd mgcv/man/gam.convergence.Rd mgcv/man/bug.reports.mgcv.Rd mgcv/man/ mgcv/man/ mgcv/man/influence.gam.Rd mgcv/man/gamlss.gH.Rd mgcv/man/pen.edf.Rd mgcv/man/mgcv-parallel.Rd mgcv/man/Beta.Rd mgcv/man/smooth.construct.mrf.smooth.spec.Rd mgcv/man/gamObject.Rd mgcv/man/smoothCon.Rd mgcv/man/uniquecombs.Rd mgcv/man/print.gam.Rd mgcv/man/mvn.Rd mgcv/man/initial.sp.Rd mgcv/man/exclude.too.far.Rd mgcv/man/formula.gam.Rd mgcv/man/gam.check.Rd mgcv/man/s.Rd mgcv/man/choose.k.Rd mgcv/man/ mgcv/man/smooth.construct.t2.smooth.spec.Rd mgcv/man/smooth.construct.fs.smooth.spec.Rd mgcv/man/gam.Rd mgcv/man/polys.plot.Rd mgcv/man/ mgcv/man/ mgcv/man/rmvn.Rd mgcv/man/ziP.Rd mgcv/man/gevlss.Rd mgcv/man/logLik.gam.Rd mgcv/man/ocat.Rd mgcv/man/ziplss.Rd mgcv/man/negbin.Rd mgcv/man/mgcv-FAQ.Rd mgcv/man/random.effects.Rd mgcv/man/ mgcv/man/gaulss.Rd mgcv/man/coxpht.Rd mgcv/man/sp.vcov.Rd mgcv/man/gam.vcomp.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.