
How many smooths in a fitted model
Source:R/gamm4-methods.R, R/glmmtmb.R, R/utililties.R
n_smooths.RdHow many smooths in a fitted model
Usage
# S3 method for class 'gamm4'
n_smooths(object)
# S3 method for class 'glmmTMB'
n_smooths(object)
n_smooths(object)
# Default S3 method
n_smooths(object)
# S3 method for class 'gam'
n_smooths(object)
# S3 method for class 'gamm'
n_smooths(object)
# S3 method for class 'bam'
n_smooths(object)Arguments
- object
a fitted GAM or related model. Typically the result of a call to
mgcv::gam(),mgcv::bam(), ormgcv::gamm().
Details
For glmmTMB models, n_smooths() counts smooth terms across the
conditional, zero-inflation and dispersion predictors. Each fitted smooth
is counted once; native random effects are excluded. Models without smooths
return integer zero.