Learn R Programming

gratia (version 0.9.0)

basis_size: Extract basis dimension of a smooth

Description

Extract basis dimension of a smooth

Usage

basis_size(object, ...)

# S3 method for mgcv.smooth basis_size(object, ...)

# S3 method for gam basis_size(object, ...)

# S3 method for gamm basis_size(object, ...)

Arguments

object

A fitted GAM(M). Currently mgcv::gam() (and anything that inherits from the "gam" class, e.g. mgcv::bam()) and mgcv::gamm() are supported.

...

Arguments passed to other methods.

Examples

Run this code
load_mgcv()

df <- data_sim("eg1", n = 200, seed = 1)
m <- bam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = df)

basis_size(m)

Run the code above in your browser using DataLab