fit_gam function

Generalized additive model