3
Loading Events
Home Recorded Courses Introduction to Stan for Bayesian Data Analysis (ISBDPR)
ISBDPR

Introduction to Stan for Bayesian Data Analysis

Learn Stan from scratch and build custom Bayesian models with rstan and cmdstanr in R.

  • Duration: 12 Hours
  • Format: Recorded ‘on-demand’ Format

£250Registration Fee

Register Now

Like what you see? Click and share!

5.0

from 200+ reviews

Course Description

Stan (https://mc-stan.org) is “a state-of-the-art platform for statistical modeling and high-performance statistical computation. Thousands of users rely on Stan for statistical modeling, data analysis, and prediction in the social, biological, and physical sciences, engineering, and business.” Stan is a powerful programming language for developing and fitting custom Bayesian statistical models. In this course, we provide a general introduction to the Stan language, and describe how to use it to develop and run Bayesian models. We begin by first covering the theory behind Stan, which covers Bayesian inference, Markov Chain Monte Carlo (MCMC) for sampling from probability distributions, and the efficient Hamiltonian Monte Carlo (HMC) method that Stan implements. Next, we learn how to write Stan models by creating simple Bayesian such as binomial models and models using normal distributions. In so doing, the basics of the Stan language will be apparent. Although Stan can be used with multiple different type of statistical programs (Python, Julia, Matlab, Stata), we will use Stan with R exclusively, specifically using the rstan or cmdstanr packages. Using these packages, we will can compile and sample from a HMC sampler for the Bayesian models we defined, plot and summarize the results, evaluate the models, etc. We then cover some widely used and practically useful models including linear regression, logistic regression, multilevel and mixed effects models. We will end by covering some more complex models, including probabilistic mixture models.

What You’ll Learn

During the course we will cover the following:

  • Explain the principles of Bayesian inference and describe the role of posterior distributions in high-dimensional spaces.
  • Compare and contrast MCMC methods, including Metropolis and Hamiltonian Monte Carlo (HMC), and explain why HMC is more efficient for Bayesian inference.
  • Develop and implement simple Bayesian models in Stan, including binomial and univariate normal models, and specify appropriate priors.
  • Use rstan and cmdstanr to compile Stan models, run HMC sampling, and generate posterior samples for inference and prediction.
  • Fit and interpret regression models in Stan, including linear, logistic, Poisson, and general linear models with categorical predictors.
  • Build and evaluate multilevel and mixed-effects models in Stan, with a focus on linear mixed models and alternative specification strategies.
  • Design and implement probabilistic mixture models in Stan, understanding their role as latent variable models for complex data.
  • Apply Stan’s flexibility as a probabilistic programming language to create, adapt, and extend bespoke Bayesian models beyond standard applications.

Course Format

Flexible Learning Structure

Learn through a carefully structured mix of lecture recordings and guided exercises that you can pause, revisit, and complete at your own pace—ideal for busy professionals or those balancing multiple commitments.

Access Anytime, Anywhere

All course content is available on-demand, making it accessible across all time zones without the need to attend live sessions or adjust your schedule.

Independent Exploration with Support

Engage deeply with course topics through self-directed study, with the option to reach out to instructors via email for clarification or deeper discussion.

Comprehensive Learning Resources

Gain full access to the same high-quality materials provided in live sessions, including code, datasets, and presentation slides—all available to download and keep. Please note recordings can only be streamed.

Work With Your Own Data, On Your Terms

Apply what you learn directly to your own data projects as you go, allowing for a personalized and immediately practical learning experience.

Continued Guidance and Resource Access

Receive 30 days of post-enrolment email support and unrestricted access to all session recordings during that time, so you can review and reinforce your learning as needed.

Who Should Attend / Intended Audiences

This course is designed for participants interested in conducting advanced Bayesian data analysis using Stan, a state-of-the-art platform for statistical modelling widely applied across the sciences, engineering, business, and beyond. Attendees should already be familiar with key inferential statistics concepts such as hypothesis testing and statistical significance, and have practical experience with methods including linear regression, logistic regression, and mixed-effects models in R. Some prior experience with R is required, but no previous knowledge of Stan is necessary.

Equipment and Software requirements

A laptop or desktop computer with a functioning installation of R and RStudio is required. Both R and RStudio are free, open-source programs compatible with Windows, macOS, and Linux systems.

While not essential, using a large monitor—or ideally a dual-monitor setup—can significantly enhance your learning experience by allowing you to view course materials and work in R simultaneously.

All necessary R packages will be introduced and installed during the workshop.

Download R Download RStudio Download Zoom

Dr. Mark Andrews

Dr. Mark Andrews

Mark is a psychologist and statistician whose work lies at the intersection of cognitive science, Bayesian data analysis, and applied statistics. His research focuses on developing and testing Bayesian models of human cognition, with a particular emphasis on language processing and memory. He also works extensively on the theory and application of Bayesian statistical methods in the social and behavioural sciences, bridging methodological advances with real-world research challenges.

Since 2015, Mark has co-led a programme of intensive workshops on Bayesian data analysis for social scientists, funded by the UK’s Economic and Social Research Council (ESRC). These workshops have trained hundreds of researchers in the practical application of Bayesian methods, particularly through R and modern statistical packages.

 

Education & Career
• PhD in Psychology, Cornell University, New York (Cognitive Science, Bayesian Models of Cognition)
• MA in Psychology, Cornell University, New York
• BA (Hons) in Psychology, National University of Ireland
• Senior Lecturer in Psychology, Nottingham Trent University, England

 

Research Focus
Mark’s work centres on:
• Bayesian models of human cognition, especially in language processing and memory
• General Bayesian data analysis methods for the social and behavioural sciences
• Comparative studies of Bayesian vs. classical approaches to inference and model comparison
• Promoting reproducibility and transparent statistical practice in psychological research

 

Current Projects
• Developing Bayesian cognitive models of memory and linguistic comprehension
• Exploring Bayesian approaches to regression, multilevel, and mixed-effects models in psychology and social science research
• Co-leading ESRC-funded workshops on Bayesian data analysis for applied researchers

 

Professional Consultancy & Teaching
Mark provides expert training and advice in Bayesian data analysis for academic and applied research projects. His teaching portfolio includes courses and workshops on:
• Bayesian linear and generalized linear models
• Multilevel and mixed-effects models
• Cognitive modelling with Bayesian methods
• Applied statistics in R for psychologists and social scientists

He is also an advocate of open science and is experienced in communicating complex statistical methods to diverse audiences.

 

Teaching & Skills
• Instructor in Bayesian statistics, time series modelling, and machine learning
• Strong advocate for reproducibility, open-source tools, and accessible education
• Skilled in R, Stan, JAGS, and statistical computing for large datasets
• Experienced mentor and workshop leader at all academic levels

 

Links
University Profile
Personal Page
ResearchGate

Session 1 – 02:00:00 – Hamiltonian Monte Carlo for Bayesian inference.
We begin by describing Bayesian inference, whose objective is the calculation of a probability distribution over a high dimensional space, namely the posterior distribution. In general, this posterior distribution cannot be described analytically, and so to summarize or make predictions from the posterior distribution, we must draw samples from it. For this, we can use Markov Chain Monte Carlo (MCMC) methods including the Metropolis sampler, sometimes known as random-walk Metropolis. Hamiltonian Monte Carlo (HMC), which Stan implements, is ultimately an efficient version of the Metropolis sampler that does not involve random walk behaviour. In this introductory section of the course, we will go through these major theoretical topics in sufficient detail to be able to understand how Stan works.

Session 2 – 02:00:00 – Univariate models.
To learn the Stan language and how to use it to develop Bayesian models, we will start with simple models. In particular, we will look at binomial models and models involving univariate normal distributions. The models will allow us to explore many of the major features of the Stan language, including how to specify priors, in conceptually easy examples. Here, we will also learn how to use rstan and cmdstanr to compile the HMC sampler from the defined Stan model, and draw samples from it.

Session 3 – 02:00:00 – Univariate models continued

Session 4 – 02:00:00 – Regression models.
Having learned the basics of Stan using simple models, we now turn to more practically useful examples including linear regression, general linear models with categorical predictor variables, logistic regression, Poisson regression, etc. All of these examples involve the use of similar programming features and specifications, and so they are easily extensible to other regression models.

Session 5 – 02:00:00 – Multilevel and mixed effects models.
As an extension of the regression models that we consider in the previous topic, here we consider multilevel and mixed effects models. We primarily concentrate on linear mixed effects models and consider the different ways to specify these models in Stan.

Session 6 – 02:00:00 – Probabilistic mixture models
Because Stan is a programming language, it essentially gives us the means to create any bespoke or custom statistical model, and not just those that are widely used. In this final topic, we will cover some more complex cases to illustrate it power. In particular, we will cover probabilistic mixture models, which are a type of latent variable model.

Testimonials

PRStats offers a great lineup of courses on statistical and analytical methods that are super relevant for ecologists and biologists. My lab and I have taken several of their courses—like Bayesian mixing models, time series analysis, and machine/deep learning—and we've found them very informative and directly useful for our work. I often recommend PRStats to my students and colleagues as a great way to brush up on or learn new R-based statistical skills.

Rolando O. Santos

PhD Assistant Professor, Florida International University

Courses attended

SIMM05, IMDL03, ITSA02, GEEE01 and MOVE07

Testimonials

PRStats offers a great lineup of courses on statistical and analytical methods that are super relevant for ecologists and biologists. My lab and I have taken several of their courses—like Bayesian mixing models, time series analysis, and machine/deep learning—and we've found them very informative and directly useful for our work. I often recommend PRStats to my students and colleagues as a great way to brush up on or learn new R-based statistical skills.

Rolando O. Santos

PhD Assistant Professor, Florida International University

Courses attended

SIMM05, IMDL03, ITSA02, GEEE01 and MOVE07

Testimonials

PRStats offers a great lineup of courses on statistical and analytical methods that are super relevant for ecologists and biologists. My lab and I have taken several of their courses—like Bayesian mixing models, time series analysis, and machine/deep learning—and we've found them very informative and directly useful for our work. I often recommend PRStats to my students and colleagues as a great way to brush up on or learn new R-based statistical skills.

Rolando O. Santos

PhD Assistant Professor, Florida International University

Courses attended

SIMM05, IMDL03, ITSA02, GEEE01 and MOVE07

Frequently asked questions

Everything you need to know about the product and billing.

When will I receive instructions on how to join?

You’ll receive an email on the Friday before the course begins, with full instructions on how to join via Zoom. Please ensure you have Zoom installed in advance.

Do I need administrator rights on my computer?

Yes — administrator access is recommended, as you may need to install software during the course. If you don’t have admin rights, please contact us before the course begins and we’ll provide a list of software to install manually.

I’m attending the course live — will I also get access to the session recordings?

Yes. All participants will receive access to the recordings for 30 days after the course ends.

I can’t attend every live session — can I join some sessions live and catch up on others later?

Absolutely. You’re welcome to join the live sessions you can and use the recordings for those you miss. We do encourage attending live if possible, as it gives you the chance to ask questions and interact with the instructor. You’re also welcome to send questions by email after the sessions.

I’m in a different time zone and plan to follow the course via recordings. When will these be available?

We aim to upload recordings on the same day, but occasionally they may be available the following day.

I can’t attend live — how can I ask questions?

You can email the instructor with any questions. For more complex topics, we’re happy to arrange a short Zoom call at a time that works for both of you.

Will I receive a certificate?

Yes. All participants receive a digital certificate of attendance, which includes the course title, number of hours, course dates, and the instructor’s name.

When will I receive instructions on how to join?

You’ll receive an email on the Friday before the course begins, with full instructions on how to join via Zoom. Please ensure you have Zoom installed in advance.

Do I need administrator rights on my computer?

Yes — administrator access is recommended, as you may need to install software during the course. If you don’t have admin rights, please contact us before the course begins and we’ll provide a list of software to install manually.

I’m attending the course live — will I also get access to the session recordings?

Yes. All participants will receive access to the recordings for 30 days after the course ends.

I can’t attend every live session — can I join some sessions live and catch up on others later?

Absolutely. You’re welcome to join the live sessions you can and use the recordings for those you miss. We do encourage attending live if possible, as it gives you the chance to ask questions and interact with the instructor. You’re also welcome to send questions by email after the sessions.

I’m in a different time zone and plan to follow the course via recordings. When will these be available?

We aim to upload recordings on the same day, but occasionally they may be available the following day.

I can’t attend live — how can I ask questions?

You can email the instructor with any questions. For more complex topics, we’re happy to arrange a short Zoom call at a time that works for both of you.

Will I receive a certificate?

Yes. All participants receive a digital certificate of attendance, which includes the course title, number of hours, course dates, and the instructor’s name.

Still have questions?

Can’t find the answer you’re looking for? Please chat to our friendly team.

×

Tickets

The numbers below include tickets for this event already in your cart. Clicking "Get Tickets" will allow you to edit any existing attendee information as well as change ticket quantities.
ISBDPR Recorded
ISBDPR Recorded
£ 250.00
Unlimited
£250.00
23rd May 2036 - 25th May 2036
Recorded, United Kingdom
Planet