New online Stan coding course
Hey everyone! I’m excited to announce my new online course for learning direct Stan coding for Bayesian analysis. Available now; enroll here: https://athlyticz.com/stan-i.
— TL;DR —
- Actual Stan coding, not a high-level interface
- At-your-own-pace videos: shows live coding while explaining
- Hosted RStudio session to practice alongside me
- Starts with fundamentals, builds to hierarchical models
- Emphasizes a Bayesian workflow
- Modeling applied to sports data
My goal is to make learning Stan as easy and fast as possible.
Details below:
If you — or someone you know — may be keen on mastering Stan and Bayesian analysis at your own pace and modeling sports data, that’s this course.
Here’s what sets my course apart:
It gives you 80 videos to learn by watching me live code for you and
walk you through every line of code in R
and Stan
. Along with using
cmdstanr
as the interface between these languages, I leverage modern
R
/tidyverse
tools for data exploration, posterior review, and more.
And you can binge-watch or revisit all lessons as needed.
Starting with fundamental concepts (e.g., probability, distributions, simulation), I gradually introduce you to basic regressions, correlations, and hierarchical modeling. Throughout, I emphasize a Bayesian workflow, culminating in a comprehensive case study.
Unlike courses and textbooks using high-level wrappers (rstanarm
,
brms
, ulam
), I guide you to code directly in Stan, supported by
handy functions from posterior
, tidybayes
, and ggdist
for easy and
efficient posterior handling and visualization. I’ll show you that
rvar
objects and functions like spread_draws
make Stan friendlier;
no need to “go Houdini”!
To create a smooth learning experience, my course videos are paired with a web-based RStudio session. This setup lets you run and modify all the code with me interactively, seeing firsthand how your changes impact outcomes — without worrying about setup issues.
In essence, I’ve crafted the course I wish I had when starting out. I’m currently working on a follow-up, intermediate course. Looking forward to sharing this journey with you! :)
Here’s a general list of topics in the course:
- Introducing Bayesian analysis for sports
- Exploring uncertainty and variation
- Introducing probability, random variables, and
distributions
- Concepts in probability
- Random variables
- Discrete distributions
- Bernoulli
- Bernoulli as a special case of Binomial
- Binomial with specific conditions is a Poisson
- Binomial with specific conditions is a Normal
- Continuous distributions
- Continuous uniform distribution
- Beta distribution
- Normal distribution
- Summary statistics
- Two joint distributions
- Marginal distributions
- Conditional distributions
- Independence between variables
- Getting to Bayes rule
- Priors, likelihoods, and posteriors: Bayes Rule
- Simulating distributions in R
- Representing distributions with the random variable code object
- Simulation and models in Stan
- Posterior simulation: example with grid approximation
- Approximate posteriors with MH and HMC
- A language for describing models
- Simple normal regression
- cmdstanr model object, helper functions, model evaluation
- Extending normal regression
- Generalized linear models: conceptual introduction
- GLMs: Modeling integer or count outcomes
- More GLMs: Modeling categorical outcomes
- Hierarchical models, an Introduction
- Workflow recap
- Case study
- Next steps: for the case study, and your journey