R and JAGS code seen in lectures
- Youyi Fong
- Padelford C-14E
- Office Hours: T/Th 12:30-1:30 or by appointment
| Teaching Assistant
- Wen Wei Loh
- Padelford C-312
- Office Hours: Tues 4:30-5:30 and Wed 3:00-4:00
Please include "564" (without quotes) in any emails to allow for appropriate filtering.
- Week 10:
- Week 9:
- Read Chapter 11
- HW8, due Thu, May 31
- 11.2 (a) to (d). In (b), use 5 degrees of freedom for Wishart. In (c), use JAGS to do the sampling. Remember to center every covariate. In (d), just plot the diagonal elements of Sigma.
- Extra credit 11.2 (e)
- Week 8:
- Read Chapter 9, 10
- HW 7, due Thu, May 24
- 10.2 (d), (e). Use JAGS to perform posterior sampling. Try two different priors as we did for the Poisson regression example.
- default prior
- 'unit information' prior
- Week 7:
- Read Chapter 8,
- HW 6, due Thu, May 17
- 8.3, (a), (b), (c) and (e). You can use JAGS to do Gibbs sampling in (a) or write your own Gibbs code, extra credit for doing both.
- Week 6 (April 29):
- Read Chapter 6, 7
- HW5, due Thu, May 10
- 6.1 (a) and (d). Also draw a graphical model. In (d), use JAGS to do the sampling.
- 7.4. For part (d), only do d.iii, draw and graphical model and use JAGS to do the sampling.
- Week 5:
- Read Chapter 5 and 6
- HW4, due Thu, May 3
- This week's homework is light because your one-page project summary is due soon on May 8. Please come talk to me if you have any questions.
- Extra credit: 5.1
- Week 4:
- Read Chapter 4 and 5
- HW3, due Thu, April 26
- 3.3 part (a), 4.2. For 4.2 (b) use n0 values between 1 and 10. For 4.2 (c) you only have to repeat part 4.2 (a).
- 4.8 (a)-(b)
- Extra credit: 4.8 (c)-(d)
- Week 3:
- Read Chapter 3 and 4
- Do exercises 3.2, 3.7 (also draw a graphical model and write a JAGS model file ); extra credit: 3.9 (a)-(c). Due Thu, April 19.
- Week 2:
- Week 1: Read Chapter 1 and 2 of the text
- Eight homework assignments
- Final project, count as two homework assignments
- Introduction to Bayesian statistics
- Concepts of randomness and probability, review of probability calculus
- Inference for binomial and Poisson distributions
- Monte Carlo
- Inference for normal distribution
- Hierarchical models
- Multivariate normal distribution
- Linear regression models
- Generalized linear models
- Generalized linear mixed-effects models
Each turned in item receives an initial grade of x, then the actual grade is y=x exp(-d/8), where d is the number of days (including weekends) after the due date I receive the work. Everyone receives one grace period to be applied to one homework for the entire quarter.
- Final project planning
- One page summary of background, data and model due on May 8
- Meet to discuss projects in half an hour blocks during 12:30-3:30 on May 8 or 12:30-1:30 on May 10
- 15-20 min class presentations and a report (2-3 page text + up to 3 tables and/or figures) due on May 31