HomeRBayesian Modeling with RJAGS

# Bayesian Modeling with RJAGS

In this course, you'll learn how to implement more advanced Bayesian models using RJAGS.

4 Hours15 Videos58 Exercises

or

Training 2 or more people?Try DataCamp For Business

## Course Description

The Bayesian approach to statistics and machine learning is logical, flexible, and intuitive. In this course, you will engineer and analyze a family of foundational, generalizable Bayesian models. These range in scope from fundamental one-parameter models to intermediate multivariate & generalized linear regression models. The popularity of such Bayesian models has grown along with the availability of computing resources required for their implementation. You will utilize one of these resources - the rjags package in R. Combining the power of R with the JAGS (Just Another Gibbs Sampler) engine, rjags provides a framework for Bayesian modeling, inference, and prediction.

### .css-1goj2uy{margin-right:8px;}Group.css-gnv7tt{font-size:20px;font-weight:700;white-space:nowrap;}.css-12nwtlk{box-sizing:border-box;margin:0;min-width:0;color:#05192D;font-size:16px;line-height:1.5;font-size:20px;font-weight:700;white-space:nowrap;}Training 2 or more people?

Try DataCamp for BusinessFor a bespoke solution book a demo.
1. 1

### Introduction to Bayesian Modeling

Free

Bayesian models combine prior insights with insights from observed data to form updated, posterior insights about a parameter. In this chapter, you will review these Bayesian concepts in the context of the foundational Beta-Binomial model for a proportion parameter. You will also learn how to use the rjags package to define, compile, and simulate this model in R.

Play Chapter Now
The prior model
50 xp
Simulating a Beta prior
100 xp
Comparing & contrasting Beta priors
100 xp
Which prior?
50 xp
Data & the likelihood
50 xp
Simulating the dependence of X on p
100 xp
Approximating the likelihood function
100 xp
Interpreting the likelihood function
50 xp
The posterior model
50 xp
Define, compile, and simulate
100 xp
Updating the posterior
100 xp
Influence of the prior & data on the posterior
50 xp
2. 2

### Bayesian Models & Markov Chains

The two-parameter Normal-Normal Bayesian model provides a simple foundation for Normal regression models. In this chapter, you will engineer the Normal-Normal and define, compile, and simulate this model using rjags. You will also explore the magic of the Markov chain mechanics behind rjags simulation.

3. 3

### Bayesian Inference & Prediction

In this chapter, you will extend the Normal-Normal model to a simple Bayesian regression model. Within this context, you will explore how to use rjags simulation output to conduct posterior inference. Specifically, you will construct posterior estimates of regression parameters using posterior means & credible intervals, you will test hypotheses using posterior probabilities, and you will construct posterior predictive distributions for new observations.

4. 4

### Multivariate & Generalized Linear Models

In this final chapter, you will generalize the simple Normal regression model for application in broader contexts. You will incorporate categorical predictors, engineer a multivariate regression model with two predictors, and finally extend this methodology to Poisson multivariate regression models for count variables.

### GroupTraining 2 or more people?

Datasets

Sleep study data

Collaborators

Alicia Johnson

Associate Professor, Macalester College

See More