Christel de Bruijn, PhD @christeldebruijn.bsky.soc Profile picture
master in public health | care about global, social and #climate justice | work in environmental health | research methods | happiest outdoors and in mountains

Oct 20, 2022, 17 tweets

Recently, I have been learning to use generalised additive models (#GAMs)

Learning resources for GAMs can be hard to find so here are some that I have found useful

Note: mostly for #RStats

Hopefully useful for anyone starting with GAMs (incl. #epitwitter folks)

🧵

If you've never done anything with GAMs before, this 3+ hour webinar by @ucfagls is truly excellent! Great conceptual explanations!

Watched it several times, and each time I pick up something new from it as I learn more about GAMs

There are some great interactive courses by @noamross.

One is free: noamross.github.io/gams-in-r-cour…

The other one is on DataCamp (not free)

Another set of freely available useful course slides by @ucfagls: github.com/gavinsimpson/p…

The course seems to be run annually (registration fee required). Latest one ran a few days ago.

A nice seminar by @noamross about all the things that one can do with GAMs in mgcv (rather than a "how to" seminar):

Some books:

A freely available online, easily navigable book accessible for those without a degree in maths or statistics by @statsdatasci:

m-clark.github.io/generalized-ad…

A great book (e-copy and hard copy) by Simon Wood, a leading expert on GAMs and author of the widely used mgcv package:

worldcat.org/title/10030188…

Heavy on algebra, but also full of practical examples of coding.

Simon also has a website with slides of lots of presentations he has given.

maths.ed.ac.uk/~swood34/
maths.ed.ac.uk/~swood34/mgcv/

Both @noamross and @ucfagls have Github sites.

github.com/noamross contains list of GAM resources (some overlap with this thread, some additional ones) - and also link to slides for another course

github.com/gavinsimpson has link to package gratia for visualisation of GAMs

Gavin also has a great blog with lots of GAM stuff:
fromthebottomoftheheap.net/blog/

The Cross Validated forum on Stack Exchange is an absolute treasure trove of practical questions and answers about GAMs. Many detailed answers by @ucfagls

Check out the tags generalized-additive-model and mgcv

stats.stackexchange.com

Search the archives of the r-help mailing list for GAM terms

mail-archive.com/r-help@r-proje…

Some great tutorial type journal papers on using GAMs. Papers written for ecology and physiology use cases but don't be put off by this! Still very readable!

All accompanied by code and exemplary commenting!

Paper by @ucfagls:
frontiersin.org/articles/10.33…

Hierarchical generalized additive models in ecology: an introduction with mgcv

by @ucfagls @noamross @ericJpedersen

For code see github.com/eric-pedersen/…

peerj.com/articles/6876

Using generalized additive models to decompose time series and waveforms, and dissect heart–lung interaction physiology

Note paywall: doi.org/10.1007/s10877… (contact first author @JohsEnevoldsen or @ucfagls)

Last but not least (for now), the manual pages (rather than vignettes) for mgcv contain extensive documentation and coding examples

Admittedly it can be a bit hard to find things sometimes, but it's worth persisting and clicking through on related pages

rdrr.io/cran/mgcv/man/

These are the sources that I have found most useful until now. I will add to this as I venture further into the world of GAMs.

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling