応用統計(ベイズ統計学入門)
Schedule
Schedule in 2020 (A1A2 term)
Lecture 1 (September 25) Chapter 1 (Introduction to R) 1.2
1.2 Summary statistics, barplots, boxplots, histogram, scatterplots
Lecture 2 (October 2) Chapter 1 (Introduction to R) 1.3, 2.1
1.3 Comparison of two means, Generation of normal random variables
1.3 How to define functions, How to input data, Monte Carlo simulation for normal and exponential populations
2.1 Introduction to Bayes Theorem
Lecture 3 (October 9) Chapter 2 (Introduction to Bayesian Statistics) 2.2, 2.3, 2.4
2.2, 2.3 Binomial distribution and Discrete prior
2.4 Binomial distribution and Beta prior
Lecture 4 (October 16) Chapter 2 (Introduction to Bayesian Statistics) 2.4, 2.6, 3.2
2.4 Binomial distribution and Beta prior
2.6 Prediction. Predictive density
3.2 Normal distribution
Assignment #1
Lecture 5 (October 23) Chapter 3 (Single parameter model) 3.2, 3.3
3.2 Normal distribution
3.3 Heart transplant mortality rate (Poisson distribution)
Lecture 6 (October 30) Chapter 4 (Multi-parameter model) 4.2, 4.3
4.2 Normal data
4.3 Multinomial model
Lecture 7 (November 6) Chapter 4, 5 (Introduction to Bayesian computation) 4.4, 5.3,5.5
4.3 Multinomial model
5.3 Log posterior function in R
5.5 Approximations Based on Posterior Modes
Assignment #1 submission due date
Lecture 8 (November 27) Chapter 5, 6 (Markov chain Monte Carlo) 6.2, 6.3
5.5 Approximations Based on Posterior Modes
5.2, 5.7 Monte Carlo Integration
6.2 Markov chain
6.3 Metropolis-Hastings algorithm
Assignment #2
Lecture 9 (December 4) Chapter 6 (Markov chain Monte Carlo) 6.3, 6.4, 6.5
6.3 Metropolis-Hastings algorithm
6.4 Gibbs sampler
6.5 Output analysis
Example using WinBUGS (NIMBLE) (6.7) (6.8)
Lecture 10 (December 11) Chapter 6 (Markov chain Monte Carlo) 6.7, 6.8
Example using WinBUGS (NIMBLE) (6.7) (6.8)
Normal distributions (4.2)
6.5 Output analysis
Lecture 11 (December 18) Chapter 6 (Markov chain Monte Carlo) 2.4, 3.3, 6.9, 6.10
Example using WinBUGS (NIMBLE)
Poisson distributions (3.3)
Binomial distributions (2.4)
Cauchy distribution (6.9)
Analysis of Stanford heart transplant data (6.10)
Assignment #2 submission due date
Empirical paper (Assignment #3 and Term paper)
Lecture 12 (December 25) 6.10, Chapter 7
Example using WinBUGS (NIMBLE)
Analysis of Stanford heart transplant data (6.10)
Hierarchical modeling (7.4)
January 6 No class
Lecture 13 (January 8) Chapter7, Chapter 9, Chapter 11
Hierarchical modeling (7.5-7.10)
Regression model (9.2)
January 29 Empirical paper submission due date
Syllabus
R language
Install R and RStudio:
Visit R Homepage and download R from a mirror site.
R Studio (Free): a set of integrated tools for R. Very convenient.
“Bayesian Computation With R” by Jim Albert
pdf is available at University
How to install “LearnBayes” library
Start R Studio
Tools -> Install packages…
Type “LearnBayes” in "Packages" and click “Install"
NIMBLE (R package for MCMC, mostly compatible with BUGS and JAGS)
Install NIMBLE
Install R and Rstudio
Visit the web page of https://r-nimble.org/ and see Documentation
Install Rtools (Windows users) or Xcode (Mac users) . See Chapter 4 of Manual (https://r-nimble.org/html_manual/cha-welcome-nimble.html )
Install packages: igraph, coda, R6
Install package: nimble
NIMBLE Examples
WinBUGS, OpenBUGS and Stata
Install WinBUGS
Visit the web page of the BUGS Project
Download WinBUGS (winbugs143_unrestricted.zip)
Go to WinBUGS folder and double-click on WinBUGS14.exe to start WinBUGS.
File -> Open and choose “WinBUGS14_immortality_key.txt” among Text (*.txt) files.
Tools -> Decode and “Decode All”.
File -> Open and choose “WinBUGS14_cumulative_patch_No3_06_08_07_RELEASE.txt” among Text (*.txt) files.
Tools -> Decode and “Decode All”
Done!
WinBUGS Examples
Stata