Examples & Case Studies

Sixteen executable notebooks demonstrating Aurora-GLM across GLM, GAM, and GAMM workflows. Each case study walks through data preparation, model specification, fitting, diagnostics, and interpretation. Every model mentioned in a notebook is actually fitted in it. All notebooks are available on GitHub and can be run locally.

Generalized Linear Models (GLM)

Insurance Pricing (Gamma GLM)

Medical insurance charges with a Gamma GLM: log vs identity link comparison, age × BMI interaction, and risk segmentation.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/01_insurance_gamma_glm.ipynb
French Motor Claims (Poisson / Negative Binomial)

Claim frequency with an exposure offset: overdispersion detection and Negative Binomial with ML-estimated dispersion.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/02_french_motor_poisson_nb.ipynb
Telco Customer Churn (Binomial GLM)

Logistic regression with odds ratios, ROC analysis, and calibration diagnostics.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/03_telco_churn_binomial_glm.ipynb
Restaurant Health Scores (Beta GLM)

Beta regression for bounded scores, with spline regression for the non-linear age effect.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/04_restaurant_health_beta_glm.ipynb
Species Distribution (Poisson GLM)

Multi-model Poisson regression with rate ratios and nested-model comparison.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/09_species_distribution_glm.ipynb
US Accidents (Binomial GLM at scale)

Large-n binary classification with calibration and class-imbalance analysis.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/10_us_accidents_binomial_glm.ipynb

Generalized Additive Models (GAM)

Air Quality with GAM

Additive model with GCV smoothing-parameter selection and identifiability constraints.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/05_air_quality_gam.ipynb
Bike-Sharing Demand

Hourly rental counts with smooths for temperature, humidity, and time-of-day effects.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/06_bike_sharing_gam.ipynb
Wind Power Forecasting

Gamma GLM baseline vs GAM on log(power), with a power-curve analysis.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/07_wind_power_gam.ipynb
E-Commerce Conversion (Binomial GAMM with smooths)

Conversion rates with smooth price, duration, and hour effects (PQL) plus a random intercept per day-of-week.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/08_ecommerce_conversion_gam.ipynb

Generalized Additive Mixed Models (GAMM)

Sleep Study (GAMM)

Random intercepts and slopes on the classic sleep-study dataset, with marginal vs conditional R².

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/11_sleep_study_gamm.ipynb
Longitudinal Clinical Trial

Repeated measures with an identity vs AR(1) covariance comparison and effect sizes.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/12_clinical_trial_longitudinal_gamm.ipynb
Clinical Trial (Multilevel)

Patients nested in clinics; the LPM-with-random-effects vs PQL trade-off under separation.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/13_clinical_trial_multilevel.ipynb
Psychometric Crossed Effects

Crossed random effects for subjects and items — the large sparse mixed-model case.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/14_psychometric_crossed_gamm.ipynb
Educational Multilevel Models (PISA UK)

Eight models from null to random slopes on real PISA UK data, with variance partitioning.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/15_educational_multilevel_gamm.ipynb
Breast Cancer Outcomes (Binomial GAMM, PQL)

Multi-center binary outcome via Penalized Quasi-Likelihood: odds ratios, latent-scale ICC, and PQL limitations.

https://github.com/Matcraft94/Aurora-GLM/tree/main/examples/06_case_studies/16_breast_cancer_binomial_gamm.ipynb