Introduction to MCMC and Bayesian Regression via rstan

Introduction to MCMC and Bayesian Regression via rstan

Close Popup

Aim of Course:

In this online course, “Introduction to MCMC and Bayesian regression via rstan" students will learn how to apply Markov Chain Monte Carlo techniques (MCMC) to Bayesian statistical modeling using R and rstan. Topics covered include Gibbs sampling and the Metropolis-Hastings method. Participants will also learn how to implement linear regression (normal and t errors), poisson regression, binary/binomial regression and ordinal regression.


This course may be taken individually (one-off) or as part of a certificate program.
Course Program:

WEEK 1: Using Markov Chain Monte Carlo

  • Monte Carlo vs MCMC
  • Estimating parameters and probabilities from complex models
  • Sampling from random variables
  • Gibbs sampling & full conditional densities
  • Convergence
  • Metropolis-Hastings method

Preview the instructor's notes for Lesson 1.

WEEK 2: Introduction to Coding for rstan and Running An Analysis

  • Using rstan, coding principles
  • R implementations of rstan programs
  • Sampling from standard densities, distributional and target + options
  • Specifying priors and likelihoods to define a model
  • Posterior summaries

WEEK 3: Bayesian Methods for Linear Regression

  • Linear regression model in rstan
  • Setting priors on regression coefficients and residual variances
  • Extending the Normal linear model (outliers, heteroscedasticity)
  • Shrinkage Priors

WEEK 4: Bayesian Methods for Discrete Data Regression

  • Logistic regression for binary and binomial responses; using other links
  • Poisson regression
  • Ordinal Regression
  • Weighted regression




Homework in this course consists of short answer questions to test concepts and guided data analysis using software.

In addition to assigned readings, this course also has supplemental readings available online, end of course data modeling project, and example software codes.

Introduction to MCMC and Bayesian Regression via rstan

Who Should Take This Course:
Statisticians and analysts who need to build statistical models of data.

Participants should have had some exposure to Bayesian computing (such as that provided in An Introduction to Bayesian Computing and Techniques), plus some familiarity with generalized linear models (such as that provided in Generalized Linear Models).

Organization of the Course:

This course has Supplemental readings that are available online, and a final data modeling project.

Options for Credit and Recognition:

Specializations are an easy way for you to demonstrate mastery of a specific skill in statistics and analytics. This course is part of the Bayesian Statistics Specialization which uses Bayes' Theorem to perform analyses and computations, and learn what makes it so popular.

Course Text:

The required text for this course is Bayesian Statistical Modeling, 2nd edition, by Peter Congdon.



Selected R programs will be used in week 1, but the primary program used will be the freeware rstan, which can be downloaded from the R-Project.

(We recommend that you download and install prior to the course start date.)

Though the R programs used in week 1 will not require a high degree of familiarity with R, if you want to continue to use R with the entire course, you should have some prior experience and facility with it. 



April 19, 2019 to May 17, 2019 April 17, 2020 to May 15, 2020

Introduction to MCMC and Bayesian Regression via rstan


April 19, 2019 to May 17, 2019 April 17, 2020 to May 15, 2020

Course Fee: $589

Do you meet course prerequisites? What about book & software? (Click here to learn more)

We have flexible policies to transfer to another course, or withdraw if necessary (modest fee applies)

Group rates: Click here to get information on group rates. 

First time student or academic? Click here for an introductory offer on select courses. Academic affiliation?  You may be eligible for a discount at checkout.

Register Now

Add $50 service fee if you require a prior invoice, or if you need to submit a purchase order or voucher, pay by wire transfer or EFT, or refund and reprocess a prior payment. Please use this printed registration form, for these and other special orders.

Courses may fill up at any time and registrations are processed in the order in which they are received. Your registration will be confirmed for the first available course date, unless you specify otherwise.

The Institute for Statistics Education is certified to operate by the State Council of Higher Education in Virginia (SCHEV).

Contact Us
Have a question about a course before you register? Call us. We're here for you. (571) 281-8817 or ourcourses (at)

Want to be notified of future courses?

Student comments