# Bobby's Teaching Page

This academic year, 2013-14, I am teaching three sections of Applied Regression Analysis (BUS 41100) in the Fall Quarter, and one section of Bayesian Inference (BUS 41913) in the Spring Quarter, within the Booth School of Business at the University of Chicago.

## 2014 Fall BUS 41913 Bayesian Inference

BUS 41913 is a graduate course in Bayesian Inference. The course will focus on understanding the principles underlying Bayesian modeling and on building experience in the use of Bayesian analysis for making inference about real world problems. Particular attention will be paid to the computational techniques (e.g., MCMC) needed for most problems and their implementation in the R language for statistical computing.

Course syllabus (including required and recommended texts)

**Notices:**

- The Final is ready (datafile), and is due 13 June 2014.
- The
**"Midterm" exam**will be on Tuesday 20 May; The 15 May class will be devoted to review and questions. Solutions here. - We will have a short
**Quiz**at the end of class on Thursday 17 April.

**Homeworks:** (due in class at the start of lecture on the date indicated)

- Homework 1 covering Parts 0-1, due 10 April 2014
- solutions: pdf

- Homework 2 covering Part 2, due 17 April 2014
- Homework 3 covering Part 3, due 24 April 2014
- data: male-bachelors, male-none
- solutions: pdf, with birth_edu_male.R, logistic.R, and mixexp.R

- Homework 4 covering Part 4, due 1 May 2014
- data: schools 1, 2, and 3; 2008 election
- solutions: pdf, with students.R, sens.R, and election_2008.R

- Homework 5 covering Part 5, due 8 May 2014
- data: clouds
- solutions: pdf, with birth_edu_male_gibbs.R, and clouds.R

- Homework 6 covering Part 6, due 15 May 2014
- data: ages, and swim times
- solutions: pdf, with marriage.R, and swim.R

- Homework 7 covering Part 7, due 29 May 2014
- data: homeworks, and bikes
- solutions: pdf, homework.R, and bicycle.R

- Homework 8 covering Part 8, due 5 June 2014
- data: exp/pareto, and change points
- solutions pdf, exp-pareto. and change point

**Lectures: **

- Parts 0 & 1: Introduction and fundamentals
- Part 2: One parameter models
- Part 3: Monte Carlo inference
- Part 4: Multi-parameter and normal models
- Part 5: MCMC: Metropolis and Gibbs samplers
- supplementary MH proof sketch

- Part 6: Multivariate normal and linear models
- Part 7: Hierarchical modeling
- Part 8: Model criticism, selection, and averaging
- Part 9: GLMs and hierarchical LMs and GLMs
- Part 10: Latent variables and missing data

**Demos:**

- Parts 0 & 1: Rare event and binomal, Poisson, and normal examples
- Part 2: beta binomal, and poisson examples on education v. fertility (datafile) and heart transplants
- Part 3: plug-in Monte Carlo, rejection sampling, and importance sampling
- Part 4: midge, IQ, and CBS poll
- Part 5: Gibbs (for normals), Metropolis-Hastings (for normals), a RW-MH example, and effective sample size
- Part 6: bivariate normal, random Wishart draws, reading (datafile), and O2 (datafile)
- Part 7: math scores, (datafile), and rat tumors, (datafile)
- Part 8: diabetes, and RJ-MCMC
- Part 9: sparrow (datafile), and math scores (datafile), and mice (datafile)
- Part 10: data augmentation

**Computing:** The recommended language for this course is
`R`, which can be obtained from CRAN. Other languages such as
`MATLAB` are allowed but are **not recommended**. Examples in
lecture, and help in office hours, etc., will be exclusively in
`R`.

- Here is a quick
`R`tutorial and accompanying code file - The University offers
`R`tutoring - Please also see the links under computing for the regression class below

## 2013 Applied Regression Analysis (BUS41100) Sections 01, 02 and 85

**BUS 41100** is a course about regression, a powerful and
widely used data analysis technique. Students will learn how to use
regression to analyze a variety of complex real world problems. Heavy
emphasis will be placed on analysis of actual datasets, and
implementation in the `R` language for statistical
computing. Topics covered
include: simple linear regression, multiple regression, prediction,
variable selection, residual diagnostics, time series
(auto-regression), and classification (logistic regression).

Course syllabus and Re-marking policy

**Notices:**

- By request,
`R`code has been added to the end of lect4.R with sales-price prediction intervals back on the original scale.

**Lectures:**

- Week 1: Introduction to Correlated Data
`R`code, requiring data on pickups and wages; extra stratification examples, and correlation examples

- Week 2: Simple Linear Regression
`R`code, requiring data on mutual funds and the stock market

- Week 3: Inference and
Estimation for SLR
`R`code, requiring data on mutual funds- The demo on sampling distributions for linear models requires the two files linked here

- Week 4: Diagnostics
and Transformations
`R`code, requiring the Anscombe data, and data on rents, pickups, telemarketing, imports, and Consolidated Foods, Inc.

- Week 5: Multiple
Linear Regression
`R`code, requiring our trusty pickup data, and some synthetic sales data

- Week 7: More Topics in MLR
`R`code, requiring census data, and data on supervisors and on grades

- Week 8: Model Choice and Data Mining
- Week 9: An Introduction
to Time Series
`R`code, requiring data on airline passengers, beer production, the Dow Jones Industrial Average, and on the weather

- Week 10: Binary Data
and Classification
`R`code, requiring data on NBA point spreads, and German credit

**Homeworks:**

- Homework 1, requiring data on teacher's pay
- Homework 2, requiring data for scatter plots, on tractors, and the stock market
- Homework 3, requiring data on newspapers, and crime
- Homework 4, requiring data on transformations, cheese, and newspapers
- Homework 5, requiring data
on nutrition, and
beef.
- Solutions: in
`R`code

- Solutions: in
- Homework 6, requiring data
on mortality and pollution,
and newspapers
- Solutions: in
`R`code

- Solutions: in
- Homework 7, requiring data
on
UK gas consumption
- Solutions: in
`R`code

- Solutions: in

**Exams:**

- The take home
**final**is due Friday December 13- requires data on BATmobiles, OJ and adults

- The midterm project, requiring data on property tax was assigned on October 25th. It is due November 1/2 at the start of class; solutions
- The midterm is on Noveber 1/2 (sixth week); solutions.
- Last quarter's:
- The take home
**final**will be available on November 22, and is due on Friday December 13.

**Computing:** The recommended language for this course is
`R`, which can be obtained from CRAN. Other languagehs such as
`MATLAB`, `STATA`, `SAS`, `MINITAB`,
etc., are allowed but are **not recommended**. Examples in
lecture, and help in office hours, etc., will be exclusively in
`R`.

- The University offers
`R`tutoring - Some helpful video tutorials and step by step guides
- R Studio is an excelent multi-platform graphical
interface to
`R`which you will likely prefer to the default Windows/OSX GUI(s). - An interesting NY
Times article on
`R` - Blogging about success
stories and new features in
`R` - A recent article
using regressions to investigate house prices
in Chicago with
`R` - Instructions for changing
the default working directory for
`R`on Windows

**Miscellaneous:**

- An intriguing article on using regressions to understand the nature of attraction
- A fun article on using financial statistical analysis techniques to predict the outcome of the Superbowl. (You need click on the link at the bottom-right of the page and fill your name in the form to see the article.)

*Robert B. Gramacy -- 2013*