Save this video free

Stats 102C - Lecture 23 - JAGS Models

Miles Chen · 51:33 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

JAGS, or Just Another Gibbs Sampler, automates posterior sampling from hierarchical models specified in the BUGS language, avoiding the need to derive every conditional distribution by hand. The lecture shows how to connect JAGS to R with rjags and apply it to baseball batting averages, coffee-filling machines, and document clustering, including convergence checks and label switching.

Key takeaways

Chapters

0:00 Why JAGS Helps with Gibbs Sampling
4:00 Installing JAGS and Connecting It to R
7:00 BUGS Model Syntax and Distribution Parameters
12:15 Building the Hierarchical Baseball Model
17:15 Passing Baseball Data and Relationships to JAGS
25:00 Running Baseball Chains and Reading Posterior Diagnostics
34:00 Specifying the Coffee-Machine Hierarchy
39:00 Fitting the Coffee Model and Comparing Machine Uncertainty
45:30 Representing Book Passages as Clusters in JAGS
49:30 Why Label Switching Breaks Naive Cluster Averages

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 this. And I believe my screen is shared. Okay. All right. Well, yeah, happy Wednesday, happy 8:00 a.m., happy day before Thanksgiving. And uh I hope you guys are all doing well. Thanks for joining me. Um so today we will um take a look at uh using JAGS. JAGS is a software program that allows you to perform Gibbs sampling. So oh, I just posted uh homework five. And in that assignment um uh part of your assignment is to do some Gibbs sampling. And you'll you'll do it kind of manually. I

0:46 only have an R version for homework five. I apologize, but um you'll only um but you'll do some uh Gibbs sampling in a in you in a bit of a manual fashion. And you'll see that it there's a you know getting the conditional distribution can be sometimes a challenge to figure out. Uh you know sometimes it's easy. And the example um uh assigned in the homework is on the relatively easier side. But um um I guess easier, not necessarily easy easy. But um in [clears throat] in a lot of other

1:32 cases figuring out the conditional distribution can be uh quite challenging. And so JAGS um and there's other software solutions that try to make that part um easier for you. So um this today's lecture covers uh using that software. And um and we'll do that. So um so JAGS is actually a bit of a a standalone program. It's written in uh C++ and it's based off of uh an older um kind of an older system called bugs. So I don't know maybe

2:21 25 years ago or so um Gibbs sampling was performed on the computer using a um software called uh bugs uh which stood for I think Bayesian

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Miles Chen.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.