Mgcv

GAMs for Customer Lifetime Value (CLV) prediction

Customer Lifetime Value models are critical for SaaS businesses, but standard regression approaches often predict impossible values like negative revenue or infinite growth. There are established methods to handle this (i.e. constrained optimization, truncation), but these can be complex to implement and maintain in production. Even fewer approaches naturally incorporate business logic while remaining interpretable and deployable. This post demonstrates how to build CLV models that automatically respect business reality using GAMs, creating predictions that make sense without complex constraint matrices or manual bounds checking.

How to interpret and report nonlinear effects from Generalized Additive Models

Generalized additive models (GAMs) are incredibly flexible tools that fit penalized regression splines to data. But interpreting nonlinear effects from GAMs is not as easy as interpreting linear models. In this post I provide 3 simple steps to help you understand and interpret nonlinear effects from GAMs using the mgcv R package.

mvgam

R 📦 to fit Dynamic Bayesian Generalised Additive Models for time series analysis and forecasting

Phylogenetic smoothing using mgcv

Use species’ phylogenetic or functional relationships to inform and partially pool hierarchical, nonlinear smooth functions in Generalized Additive Models with mgcv

Temporal autocorrelation in GAMs and the mvgam package

Temporal autocorrelation is a dominant feature of time series. We often want to use Generalized Additive Models (GAMs) to fit smoothing splines to time series data, but incorporating autocorrelation in these models can be difficult. Enter the mvgam package