STA410S/2102S: Statistical computation

New: HW 3 due on April 11 before 5 pm; turn in to SS 6018 (Stats Dept Office)


  • There is a mistake in my expression for the log-likelihood for question 3(a): there is a missing term involving pi, the probability that Delta = 1. An amended version of the homework appears here.
  • Solutions for test 2.
  • Homework 3 is not due until April 11.
  • This file gives the calcium data needed for question 1 in a format easier to read into R.

Meets in Lash Miller, 158, Tuesday, Thursday and Friday at 1.

**Note On Fridays given jointly with STA 450S.

Course Information
This course will study how statistical computations are done, and develop students' abilities to write programs for statistical problems that are not handled by standard packages. Students will learn the capabilities of the R statistical computing environment, and learn to program new statistical methods in that environment. R will be introduced as part of the course; no prior knowledge of it is necessary.

Prerequisites: This course is designed for graduate and senior undergraduate students in statistics, actuarial science, computer science or other fields where statistical computation is important. Students should have a basic background in statistical methods (eg. at the level of STA302), and some prior experience with programming (eg. at the level of CSC108).

Textbook: Venables and Ripley. Modern Applied Statistics with S, 4th ed. Springer-Verlag. Book web page

Computing: Assignments will be done in R. Graduate students will use the Statistics/Biostatistics computer system. Undergraduates will use CQUEST. You can request an account on CQUEST if you're an undergraduate student in this course. You can also use R on your home computer by downloading it for free from

Grading scheme: Regular homework, worth 70%
Two one-hour in-class tests, each worth 15%.
The tests are scheduled for February 22 and March 22.

Syllabus: Chapters 1-3 of the text will serve as a resource/manual for using R. Our emphasis will be on Chapters 5-8, to illustrate a number of advanced statistical methods that are available through R. We will also discuss numerical and algorithmic concepts that are of particular relevance to statistics, including solution of linear systems, nonlinear optimization, and approximation of integrals. Special topics from Chapters 10, 13 and 14 will be covered as time and interests permit.

March 29, 2005

  • Handout on survival data (following Chapter 13 of VR)

March 24, 2005

  • Handout on mixed effects models (following Chapter 10.1 of VR)

March 11, 2005

  • Notes on nonlinear least squares

March 10, 2005

March 8, 2005

  • Notes on methods of optimization
  • Worth also looking at the help files for uniroot and optim

March 3, 2005

  • Notes on one-dimensional root-finding.
  • Radford Neal's program for iteration, Newton-Raphson, scoring, for truncated Poissson.
  • Some output illustrating its use.
  • you should also look at the R help file for uniroot.

March 1, 2005

  • Notes on likelihood inference.

February 24, 2005

  • Notes on inference for generalized linear models.

February 22, 2005

February 8, 2005

  • Notes on estimation of regression parameters in generalized linear models by iteratively reweighted least squares.
  • Handout of R code.
  • Practice problems for Test 1.

February 3, 2005

  • Notes on generalized linear models.

February 1, 2005

  • Notes on density estimation.

January 28, 2005

January 27, 2005

January 25, 2005

January 20, 2005

January 18, 2005

January 14, 2005

  • Data for Example G from Cox and Snell
  • R code handout

January 11 and 13, 2005

  • Annotated R code for Jan 13
  • On Friday we will meet in LM 158 (the usual place) for a tutorial on lm, the function that fits linear models in R.
  • Handwritten lecture notes for Jan 11,13. (Warning: they will print in color unless you ask for black and white.)

January 6, 2005

January 4, 2005