Course notes

Lecture 1: Basic data types
[R code]   [Reading: Matloff Chapter 1, 2, 3.1, 3.2, 3.4-3.7, 4.1-4.3, 5.1, 5.2]

Lecture 2: Flow control and looping
[R code]   [Reading: Matloff Chapter 7.1, 7.2, 2.9]

Lecture 3: Regular expressions
[R code]   [Reading: Matloff Chapter 11.1, 11.2]

Lecture 4: Text representations and data frames
[R code]   [Reading: Matloff Chapter 11.1, 6.1, 5.1]

Lecture 5: Writing and calling functions
[R code]   [Reading: Matloff Chapter 1.3, 7.3-7.6, 7.12, 7.13]

Lecture 6: More on functions
[R code]   [Reading: Same as last time]

Lecture 7: Split/apply/combine
[R code] [data]   [Reading: R Cookbook, Chapter 6]

Lecture 8: Split/apply/combine
[R code]   [Reading: Hadley Wickham, “The Split/Apply/Combine Strategy for Data Analysis”]

Lecture 9: Reshaping and merging
[R code]   [Reading: Hadley Wickham, “Tidy Data” and “Reshaping data with the reshape package” ]

Lecture 10: Debugging
[R code]   [Reading: Matloff Chapter 13]

Lecture 11: Testing
[R code, numerical_deriv.R, testthat_example.R]   [Reading: Wickham, “testthat: Get Started with Testing”]

Lecture 12: Top-down design (and the bootstrap)
[R code]   [Reading: Wirth, Program Development by Stepwise Refinement, CASI 10.2, 11.2]

Lecture 13: Version control and git
[Reading: Pro Git, Chapters 1, 2, 3, 10]

Lecture 14: Version control and git II
[commands from class]   [Reading: Pro Git, Chapters 1, 2, 3, 10]

Lecture 15: Code profiling and performance enhancement
R code, profiling-example.R   [Reading: Matloff Chapter 14, Hadley Wickham, Advanced R]

Lecture 16: Fitting probability models
[R code]

Lecture 17: Newton’s method
[R code]   [Reading: Lange 11.2, 13.3]

Lecture 18: Newton’s method II and IRLS
[R code]

Lecture 19: More optimization
[R code]   [Reading: Lange 13.3-13.6]

Lecture 20: The EM algorithm
[R code]   [Reading: Lange chapter 10]

Lecture 21: Generating random deviates
[R code]   [Reading: Lange Chapter 20]

Lecture 22: Monte Carlo Integration
[R code]   [Reading: Lange Chapter 21.1, 21.2, 21.6]

Lecture 23: Approximate Bayesian Computation
[R code]   [Reading: Bayesian Basics, Sisson, Fan, Beaumont]

Lecture 24: Markov Chains
[R code]   [Reading: Notes from Richard Weber’s course on Markov chains or Lange, Chapter 23]

Lecture 25: Metropolis Hastings
[R code]   [Reading: Lange, Chapter 24.1, 24.2]

Lecture 26: MCMC Applications
[R code]   [data]