New online Stan coding course: 80 videos + hosted live coding environment

Hey everyone! Please pardon the self-promotion. :) I’m excited to announce my new online course for learning direct Stan coding for Bayesian analysis. Available starting this Friday; you can enroll here: https://athlyticz.com/stan-i.

— TL;DR —

  • Actual Stan coding, not a high-level interface
  • At-your-own-pace Videos: watch me live coding, explaining as I type
  • Hosted RStudio session to practice running code 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 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 so you can practice with me. This setup lets you run and modify all the code with me interactively, seeing firsthand how your changes impact outcomes. No worrying about setup issues.

In essence, I’ve crafted the course I wish I had when starting out. Feel free to ask any questions about the course here or via DM. 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:


1 Introducing Bayesian analysis for sports

1.1 Introduction

1.2 Course topics

2 Exploring uncertainty and variation

2.1 Example — 100 meter Olympic sprint

2.2 Visualizing the example data

3 Introducing probability, random variables, and distributions

3.1 Concepts in probability

3.2 Random variables

3.3 Discrete distributions

3.4 Bernoulli

3.5 Bernoulli as a special case of Binomial

3.6 Binomial with specific conditions is a Poisson

3.7 Binomial with specific conditions is a Normal

3.8 Continuous distributions

3.9 Continuous uniform distribution

3.10 Beta distribution

3.11 Normal distribution

3.12 Summary statistics

3.13 Two joint distributions

3.14 Marginal distributions

3.15 Conditional distributions

3.16 Independence between variables

3.17 Getting to Bayes rule

4 Priors, likelihoods, and posteriors: Bayes Rule

4.1 Priors

4.2 Likelihoods

4.3 Normalizing constant

4.4 Conjugate priors: e.g., Beta-Binomial

5 Simulating distributions in R

5.1 Randomization

5.2 Transforming random numbers to simulate distributions

6 Representing distributions with the random variable code object

7 Simulation and models in Stan

7.1 Introduction to Stan

7.2 Stan documentation

7.3 Toy Stan example: simulating values

7.4 Compiling, fitting, and reviewing the model in R

7.5 Second example: Beta-Binomial

8 Posterior simulation: example with grid approximation

9 Approximate posteriors with MH and HMC

9.1 Random walk Metropolis Hastings

9.2 Hamiltonian Monte Carlo

10 A language for describing models

11 Simple normal regression

11.1 Overview

11.2 Priors with predictive checks

11.3 Coding a normal regression model

11.4 Compiling and fitting the model

11.5 Checking HMC diagnostics

11.6 Reviewing the model parameters

12 cmdstanr model object, helper functions, model evaluation

12.1 From sampling to Stan model object

12.2 Posterior predictive checks: three approaches

12.3 Model comparison: ELPD and loo-cv

13 Extending normal regression

13.1 Not just linear models!

13.2 Categorical predictors

14 Generalized linear models: conceptual introduction

14.1 Logit link function

14.2 Log link function

15 GLMs: Modeling integer or count outcomes

15.1 Binomially-distributed count outcomes

15.2 Poisson distributed count outcomes

16 More GLMs: Modeling categorical outcomes

17 Hierarchical models, an Introduction

17.1 Parameters sharing information

17.2 Model example

17.3 Diagnostics and reparameterization

18 Workflow recap

19 Case study

19.1 Setup

19.2 The problem

19.3 The data

19.4 Visually exploring the pitch data

19.5 Modeling goals as Bernoulli

19.6 Expanding the model

19.7 Hierarchical modeling

19.8 Using the model: estimates for decisionmaking

20 Next steps: for the case study, and your journey

11 Likes

So cool. This looks amazing!

2 Likes

Really interesting concept, and I like the tie in with sports analytics. I do wonder if the price is a bit steep, but perhaps I am out of touch.

You don’t mention it in the post, but there’s a preview video on the site. I think that’s critical, because it would be hard to spend $800 without a preview.

Although not stated here, the course comes with quizzes. Not clear if they’re auto graded like Coursera or not. Of course, anyone who takes the course is welcome to questions here for free.

@andrewgelman does live coding in his courses. He does it partly so the students can see him thrash and struggle and fail at some points. The preview should show how practiced and fluent the live coding is versus how much it’s like what Andrew does in class.

As to the cost, it’s cheap for someone at a large company with a training budget, but prohibitive for a student or an academic, at least in the U.S., where it’s hard to pay for this kind of thing out of a grant.

As an alternative, there are lots of free Stan classes online that come with videos on YouTube. I believe Ben Goodrich (@bgoodri), Richard McElreath (@richard_mcelreath), and Mike Lawrence (@mike-lawrence) all have versions. I haven’t seen any of them, but I believe they’re all based on introductory Bayesian stats classes they taught. Andrew and I signed on to put together a Coursera course along these lines, but the terms from Coursera, discussions with other people who made courses, and the lack of support from Columbia made us back out.

6 Likes

This is Michael Czahor, President @ Athlyticz.

I appreciate the thorough commentary - I think it helps add clarity to the post. I want to provide a bit more context to both support and extend your thoughts.

  • Thanks for mentioning the video preview! And while the preview video helps, you may not really know until you get in and work through some of the material, so we also give everyone three days to see up to 25 percent of the course before committing in case the course isn’t what they expected: that’s in sum part of our refund policy.

  • To help students with costs, we are sensitive to student pricing needs and any students who have reached out to admin@athlyticz.com with their LinkedIn profile and university email have received an additional % off their courses. We are still working on the advertising.

  • The coding platform that we have setup for students to run the Stan programs and other code alongside the instructors runs through Google Cloud Platform and has all Stan files, data, .rds files, etc., which we felt was critical but does add a bit to our costs.

  • The free material you mentioned are great (back in the day, Scott has attended some of those courses), and we considered that in developing this course (and others), with the aim to complement those offerings.

  • Quizzes are indeed auto-graded in real time on our platform (we generally require an 80% pass rate before the next lesson is unlocked, it’s something we are constantly evaluating in terms of user experience to ensure our constraints make sense).

  • Note: Scott is planning to run webinars through our platform to showcase some really cool modeling techniques using Stan. - We will post in the forum when those come up. They are free to attend and should give folks an opportunity to see if the platform we’ve developed is worth it for them to pursue on the course level, if not - they still get to learn some really cool stuff from our team on the webinars!

I am happy to continue the conversation in this thread - should you have further questions that are better suited for outside of this forum, my business email is michael@athlyticz.com.

3 Likes

The course looks great.

Stan is new to me but Bayes is not so the first 6 chapters look like review to me. What fraction of the recorded content does this represent?

Is there a student forum or office hours planned/included in the platform?

2 Likes

Hi Matt,

Thanks, and great questions!

The early content you mentioned is about 1/4 of the video content time.

For any questions you have that come up in the course, you can just email us at support@athlyticz.com and we will answer within 24 hours. And for cases that can’t be answered through our support email, a calendly link is generated on an as needed basis to meet with one of us on the team.

2 Likes

Hope everyone is having a great holiday. Our team wanted to let this thread know that Dr. Spencer’s course is 50% off for Black Friday through December 2nd. Secure your code here: https://link.athlyticz.com/widget/form/2CW45OegKM0J5l60qYHv

We will be creating a separate thread for his new course, Becoming a Bayesian II, which launches soon!

3 Likes