Course Schedule:

Week Content

  Week 1: Aug 29  

  Week 1: Aug 31

  Quiz 2

 Tues.  Lecture: Course Overview, Introductions, Software Overview, Quiz 1

 Thur.  HW 1 due. Videos:  Install R and R studio (5:35), Create first R Markdown file (6:36), Arithmetic in R. (3:32). Reading: ModernDive (1.1, 2.1). 

 Lecture: R overview - data structures, operations and functions, and basic plots.

 Lecture Exercises (HTML) (R Markdown)

  Week 2: Sept 5  



  Week 2: Sept 7  

 Tues.  HW2 due (HTML) (R Markdown). Handout: R Markdown reference guide, Videos: R Markdown (4:15), Subsetting (6:02),  Exploratory Graphics (6:47). Reading: ModernDive (2.2 Optional)

 Laboratory 1: Basic R with Seattle Housing Data (HTML) (R Markdown)

 Thur. Quiz 3

 Lecture: R style and functions - downloading and accessing packages, matrix style operations, tables for R Markdown.

 Lecture Exercises (HTML) (R Markdown)

  Week 3: Sept 12



  Week 3: Sept 14

 Tues. HW3 due (HTML) (R Markdown). Handout: R Style Guide, Reading: R4DS (CH 4) Videos: Writing Functions (3:17), Matrix style operations (7:29), Installing and Using R Packages (3:35), Populating tables via R Markdown (2:56)

 Laboratory 2: Functions and Tables with NYC Uber Trip Data (HTML) (R Markdown)

 Thur. Quiz 4

 Lecture: Loops and if/else statements (PDF) (R Markdown).

 Lecture Exercises (HTML) (R Markdown)

  Week 4: Sept 19




  Week 4: Sept 21

 Tues.   HW 4 due (HTML) (R Markdown). Videos: loops (4:24, videoR script), conditional statements (5:18, videoR script), Monte Carlo Procedures (4:39, videoR script).

 Laboratory 3: Simulation/Loops/Monte Carlo (HTML) (R Markdown).

 Thur. Quiz 5

Lecture: Data cleaning and wrangling with tidy data principles (PDF) (R Markdown)

Lecture Exercises (HTML) (R Markdown)

  Week 5: Sept 26



  Week 5: Sept 28

 Tues.  HW 5 due (HTML) (R Markdown). dplyr resources: R Cheatsheets (see: dplyr cheatsheet) and code vignette. Videos: substr() and strsplit() functions (4:48, videoR script). Reading: R4DS (Ch. 5), ModernDive (Ch.4 & 5).

 Laboratory 4: Data Cleaning and wrangling with Capital BikeShare Data (HTML) (R Markdown). Key (HTML) (R Markdown)

 Thur. Quiz 6

 Lecture: R Miscellanea and Debugging R Code (PDF) (R Markdown)

 Lecture Exercises (HTML) (R Markdown)

  Week 6: Oct 3



  Week 6: Oct 5

 TuesHW 6 due (HTML) (R Markdown). Debugging in R Studio. Debugging guide (optional/advanced). Video: debugging (13:29, videoR script).

 Laboratory 5: Debugging R Code (HTML) (R Markdown)

 Thur. Quiz 7

 Lecture: Data Visualization Principles and Basic Plots in R (PDF) (R Markdown)

 Lecture Exercises (HTML) (R Markdown)

  Week 7: Oct 10



  Week 7: Oct 12

 Tues. HW 7 due (HTML) (R Markdown). FlowingData (How to Spot Visualization Lies). Video: Basic Plots in R (6:47 - from Week 2)

Laboratory 6: Basic Plots in R (HTML) (R Markdown)

 Thur. Quiz 8

 Lecture: Advanced Graphics in R: GGplot2 (PDF) (R Markdown)

 Lecture Exercises (HTML) (R Markdown)

  Week 8: Oct 17


  Week 8: Oct 19

 Tues.   HW 8 due (HTML) (R Markdown). ggplot2 cheatsheetggplot2 documentation. Video: Advanced R graphics (7:48, videor script). Video: ggplot2 intro (6:53, video, r script).

 Laboratory 7: Advanced Graphics: ggplot2. (HTML) (R Markdown).  

 Thur. Midterm Exam. Take home assigned (2017 Spring Take Home)

  Week 9: Oct 24


  Week 9: Oct 26

 Tues. Take Home midterm due 

Video: R Shiny intro (3:21, video) . R Shiny Cheatsheet

 Guided Laboratory 8: Advanced Graphics: R shiny. (PDF) (R Markdown) (R Markdown Lab)  

 Thur. Quiz 9

 Lecture: SAS basics and DATA Steps (Slides)

  Week 10: Oct 31


  Week 10: Nov 2

 Tues.  HW 9 due (HTML

 Laboratory 9:  SAS basics and DATA Steps (HTML)

 Thur. Quiz 10

Lecture: SAS Procedures (Slides)

  Week 11: Nov 7


  Week 11: Nov 9

 Tues. HW 10 due (HTML). Link: SAS University help

 Laboratory 10: SAS Procedures (HTML).

  Thur. Quiz 11

 Lecture: SAS Graphics and ODS (HTML)

  Week 12: Nov 14


  Week 12: Nov 16

 Tues. HW 11 due (HTML).  PROC SGPLOT DocumentationSAS Graphics Whitepaper. Video: Using PROC SGPLOT and SGPANEL (11:53, SAS Codevideo). 

  Laboratory 11: SAS Graphics and ODS (HTML).

 Thur. Quiz 12

Lecture: Advanced SAS and SQL commands (HTML).

  Week 13: Nov 21

  Week 13: Nov 23

Tues. NO CLASS (to make up for take home exam)


  Week 14: Nov 28


  Week 14: Nov 30

 Tues. HW 12 due (HTML).   Interactive SQL TutorialSQL CheatsheetPROC SQL documentation. Video: PROC SQL (10:01, SAS Codevideo). Video: SAS Macros (5:05, SAS Codevideo)

 Laboratory 12: 

 Thur. Quiz 14

 Lecture: Statistical Modeling / Learning? (PDF) (R Markdown)

  Week 15: Dec 5


  Week 15: Dec 7

Tues. HW 13 due (HTML).  Video: Clustering and MDS (10:56, videoR script).  Video: Predictive Modeling (9:25 , videoR script). Video: Classification and Cross-Validation (9:10 , videoR script).

 Laboratory 13: SQL commands in SAS and R (HTML). Statistical Learning. (HTML) (R Markdown)

 Thur. Quiz 15

 Lecture/Final Review

  Finals Week

 Take home final (R Markdown) (PDF) 

STAT 408 Overview:

  • Meeting Time: Tuesdays and Thursdays -  10:50 -12:05 
  • Classroom: Reid Hall 401
  • Office Hours: Monday 10 - 12

Course Description

This course provides an overview of statistical computation and graphical analysis. In particular,  R and SAS will be introduced in this course.


One of: STAT 217, STAT 332, STAT 401, or equivalent.

Course Objectives

At the completion of this course, students will:

  1. Become literate in statistical programming using R and SAS,
  2. Learn to effectively communicate through visual presentation of data, and
  3. Understand and imitate good programming practices.

Textbooks / Resources (Optional)

  1. ModernDive: An introduction to Statistical and Data Sciences via R, by Chester Ismay and Albert Kim. Free at
  2. R for Data Science, by Hadley Wickham and Garret Grolemund. Free at
  3. Visualize This: The FlowingData Guide to Design, Visualization, and Statistics, by Nathan Yau, 2011.
  4. The Art of R Programming: A Tour of Statistical Software Design, by Norman Matloff, 2011,
  5. The Little SAS Book: A Primer, by Lora Delwiche and Susan Slaughter, 2012.
  6. R cheatsheets.

Course Outline

The course will be taught from a partially flipped perspective. Tuesdays will be group labs which focus on implementing the programming covered during the previous week. Thursdays will be lectures with an interactive computing component. As much of the course time will be focused on group activities and active learning, video lectures with a particular focus on computational techniques will be created to be watched out of class.

A rough course schedule will be:

  • (5 weeks) R: Intro to R, R Studio, and R Markdown. Data input, cleaning, and merging.
  • (6 weeks) Data Visualization Principles and Advanced R: ggplot2, RShiny, and statistical modeling.
  • (4 weeks) SAS: data storage, manipulation, SAS procedures, and SAS macros.

Course Evaluation:

  • Quizzes: 15% of final grade
    • There is no formal attendance policy, but there will be weekly quizzes on Thursdays. There will be no makeup for missed quizzes, but the worst score will be excluded from final grades.
  • Homework: 20% of final grade
    • Weekly homework will accompany course material. Some of the computational elements of the course will be presented as video lectures. Homework will typically be qualitative questions or short programming exercises.
    • Homework will be due Tuesday at 10:45 AM. Homework questions will typically be collected and evaluated through D2L.
  • Labs: 25% of final grade
    • Labs will be in-class group assignments conducted every Tuesday. The labs will have a large computational element.
    • The labs will be designed to be completed in 75 minutes; however, there may be times that groups need to finish labs outside of class time.
  • Midterm Exam: 20% of final grade
    • The midterm exam will be given in two parts: an in-class exam on October 19th and a take home exam due on October 24th.
  • Final Exam: 20% of final grade
    • The final will also have two parts with the take home exam portion due no later than the day of the final exam period: December 11.