## POLI 272: BAYESIAN METHODS

### Morris H. DeGroot Born: 8 June 1931 Died: 2 November 1989 Fall Quarter AY2009-2010
Department of Political Science
University of California, San Diego
La Jolla, CA 92093-0521

Classroom: SSB 104
Time: 3:00PM - 5:50PM Thursday

Instructor: Keith T. Poole

Office: SSB 368
E-Mail: kpoole@ucsd.edu

The following texts will be used in this course:

• Gelman, Andrew, John B. Carlin, Hal S. Stern, and Donald B. Rubin. 2004. Bayesian Data Analysis (2nd Edition), New York: Chapman & Hall/CRC.
• Albert, Jim. 2009. Bayesian Computation With R (2nd Edition). New York: Springer.

Requirements

This course is intended as an introduction to modern Bayesian estimation. A working knowledge of the open-source statistical package R, OLS multiple regression analysis, and STATA is required for this course. Students will also be required to learn Epsilon (EMACS), a screen editor. We will also use the open-source Bayesian statistical package WINBUGS along with a variety of "canned" programs that perform various kinds of Bayesian/Optimization analyses.

Grades will be determined by regularly assigned class problems. WINBUGS Manual (pdf file) WINBUGS Manual With Page Numbers!! (pdf file) Simon Jackman's WINBUGS Examples EPSILON HomePage -- Lugaru Software Ltd. Useful Epsilon Commands and Examples An Introduction to R. (Reference Work by R Development Core Team) Using R for Data Analysis and Graphics: An Introduction. (Reference Work by J. H. Maindonald on R Graphics) Probability Distributions in R PCH Symbols in R Octal References for Math Symbols that can be used in PlotMath in R

Course Outline
1. The Basic Mathematics of Bayesian Analysis

2. Assignment:

• Bayesian Computation with R, pp. 1 - 37
• Bayesian Data Analysis, pp. 1 - 32 Likelihood Function Confusions Binomial Likelihood Function, Beta Prior Distribution Chap_1_studentdata.r -- Simple R Program that sets up studentdata in the LearnBayes package for pages 2-8 of Bayesian Computation with R Chap_1_t_statistic_example.r -- R Program that sets up the t-distribution simulations discussed on pages 8 - 13 of Bayesian Computation with R Problem_Chap_1_1.r -- R Program to do Problem 1 of Chapter 1 on page 15 of Bayesian Computation with R Problem_Chap_1_2.r -- R Program to do Problem 2 of Chapter 1 on page 15 of Bayesian Computation with R Problem_Chap_1_3.r -- R Program to do Problem 3 of Chapter 1 on pages 15-16 of Bayesian Computation with R Chap_2_Prior.r -- R Program to do work example on pages 21 - 23 of Chapter 2 in Bayesian Computation with R Chap_2_Prior_2.r -- R Program to do work beta priors and posterior example on pages 23 - 25 of Chapter 2 in Bayesian Computation with R Undervote for WINBUGS (PDF) -- Demonstrates Differences in rates of Undervoting Undervote.odc -- WINBUGS program demonstrating Differences in rates of Undervoting (code by Simon Jackman) Cigarette Example for WINBUGS (PDF) -- Demonstrates Differences in rates of Lung Cancer by Smoking Cancer.odc -- WINBUGS program demonstrating Differences in rates of Lung Cancer by Smoking (code by Simon Jackman) First Homework Assignment Homework 1 Answers (PDF) Problem_Chap_1_1.r -- R Program to do Problem 1 of Chapter 1 on page 16 of Bayesian Computation with R Problem_Chap_1_2.r -- R Program to do Problem 2 of Chapter 1 on page 16 of Bayesian Computation with R Problem_Chap_1_3.r -- R Program to do Problem 3 of Chapter 1 on page 16 of Bayesian Computation with R Problem_Chap_1_4.r -- R Program to do Problem 4 of Chapter 1 on page 16 of Bayesian Computation with R Problem_Chap_1_5.r -- R Program to do Problem 5 of Chapter 1 on pages 16 - 17 of Bayesian Computation with R Second Homework Assignment Homework 2 Answers (PDF) Problem_Chap_2_1.r -- R Program to do Problem 1 of Chapter 2 on page of 35 Bayesian Computation with R Problem_Chap_2_2.r -- R Program to do Problem 2 of Chapter 2 on pages 35-36 of Bayesian Computation with R Problem_Chap_2_3.r -- R Program to do Problem 3 of Chapter 2 on page 36 of Bayesian Computation with R Problem_Chap_2_4.r -- R Program to do Problem 4 of Chapter 2 on page 36 of Bayesian Computation with R Problem_Chap_2_5.r -- R Program to do Problem 5 of Chapter 2 on pages 36-37 of Bayesian Computation with R Week One Part One (MP3 file for first hour and a half -- 108meg) Week One Part Two (MP3 file for second hour and a half -- 87meg)

3. Single Parameter Models

Assignment:

• Bayesian Computation with R, pp. 39 - 61
• Bayesian Data Analysis, pp. 33 - 72 Third Homework Assignment Homework 3 Answers (PDF) Problem_Chap_3_1.r -- R Program to do Problem 1 of Chapter 3 on page 58 of Bayesian Computation with R
4. Multiparameter Models

Assignment: Chap_4_Figure_4_1.r -- R Program that produces Figure 4.1 on page 65 of Bayesian Computation with R Chap_4_Figure_4_2.r -- R Program that produces Figure 4.2 on page 67 of Bayesian Computation with R Chap_4_Figure_4_3.r -- R Program that produces Figure 4.3 on page 69 of Bayesian Computation with R Chap_4_Figure_4_4-8.r -- R Program that produces Figures 4.5 to 4.8 on pages 69 - 76 of Bayesian Computation with R Chap_4_Figure_4_9-10.r -- R Program that produces Figures 4.9 and 4.10 on pages 75 - 79 of Bayesian Computation with R

5. Bayesian Computation and MCMC Methods

6. Assignment: Sixth Homework Assignment Homework 6 Answers (PDF) Seventh Homework Assignment Eighth Homework Assignment Chap_5_Figure_5_1-2.r -- R Program that produces Figures 5.1 and 5.2 on pages 89 - 93 of Bayesian Computation with R Chap_5_Figure_5_3.r -- R Program that produces Figures 5.1 and 5.2 on pages 94 - 96 of Bayesian Computation with R Chap_5_MC_Integrals.r -- R Program that does the forecasting of the heavy sleepers on page 97 of Bayesian Computation with R

7. Heirarchical Modeling

8. Assignment:

• Bayesian Computation with R, pp. 153 - 204
• Bayesian Data Analysis, pp. 117 - 196

9. Regression Models

10. Assignment:

• Bayesian Computation with R, pp. 205 - 264
• Bayesian Data Analysis, pp. 353 - 442

Â Â Â Â Â Â Â VOTEVIEW Blog NOMINATE Data, Roll Call Data, and Software Course Web Pages: University of Georgia (2010 - ) Course Web Pages: UC San Diego (2004 - 2010) University of San Diego Law School (2005) Course Web Pages: University of Houston (2000 - 2005) Course Web Pages: Carnegie-Mellon University (1997 - 2000) Analyzing Spatial Models of Choice and Judgment with R Spatial Models of Parliamentary Voting Recent Working Papers Analyses of Recent Politics About This Website K7MOA Log Books: 1960 - 2015 Bio of Keith T. Poole Related Links