CMU Summer Statistical Computing -- 2012
Instructor:
Howard Seltman (hseltman), Baker Hall 232H, X83938
Dates and Times:
Baker Hall Room 232M, M, T, Th 1:30-3:00, June 11-July 20
Textbook:
Statistical Computing in C++ and R by Eubank and Kupresanin
(Amazon) (code samples)
Class Links:
- Day 1: Day1.pdf (Computer Internals) [Reading: Chapter 2 of E&K]
helloWorld.cpp
- Day 2: Day2.pdf (Introduction to C++) [Reading: E&K, sections 3.1-3.6, 3.8.3-3.8.6, pp 95-96] HW1a due Th. 6/14
- Day 3: Day3.pdf (C++ parameter types & RNGs + redirection) [Reading: E&K, pp. 111-115] HW1b due Mon. 6/18
genGaus.cpp MCMC.R
- Day 4: Day4.pdf (C++ cout formatting, multiple fucntions) [Reading: E&K, pp. 42-49 and/or Pointer article 1 and/or Pointer article 2] iomanip.cpp Wk2D1Ex1.cpp Wk2D1Ex2.cpp Homework for Tuesday: Make a multifile version of the Gaussian MCMC using MCMCtemplate.cpp as a template.
HW solution: MCMC.h MCMCmain.cpp
MCMCsetup.cpp gausMH.cpp
- Day 5: Day5.pdf (gsl vector class, C from R) [Reading: E&K, pp. 186-192]
Homework for Thursday: write and test a C from R function to add the densities of a vector given a mean and sd.
- Day 6: Day6.pdf (C from R with BLAS/Lapack) [Reading: none]
matDemo.cpp
reg2.cpp
Homework for Monday: Complete and test this code: bootReg2.cpp
- Day 7: Day7.pdf (R intro: indexing, apply's, pitfalls, scoping) [Reading: E&K, R appendix]
- Day 8: HW for Thursday (email code to Howard): Finish the function
HW3a.R and test with HW3aTest.dat
- Day 9: Day9.pdf [Reading: E&K: 5.4-5.5 (the other sections of chapter 5 are also worth reading)]
HW for Monday: HW3b.pdf
Solutions: SeltmanHW3b.R
- Days 10/11: Day10.pdf [Reading: E&K: 5.3; optional: "S3 and S4" below]
- Day 12: Day12.pdf
HW for Monday: HW4.pdf
Solutions: SeltmanHW4.R
- Day 13: Day13.pdf
HW for Tuesday: Make one nice projection-ready plot of your ADA data using some techniques from today -- Bring the code and output to class
- Day 14+15: Day14.pdf
Day14Ex1.R
Day14Ex2.R
Homework due Monday is at the end of the notes.
Solutions: VespeHW5.R
- Day 16+17: Day16.pdf
[Reading: See links inside of Day16.pdf]
REsubstring.R
eco.txt
Krebs.txt
Krebs.R
makepdf.sh
HW for Monday: HW6.pdf
Optional Additional Reading:
- S Programming by Venables and Ripley (Springer)
(Amazon)
(see errata)
- The Art of R Programming by Norman Matloff
(Amazon)
- Modern Applied Statistics with S by Venables and Ripley
(Amazon)
- The C Programming Language by Kernighan and Ritchie
(Amazon)
General Links: