Course Materials:

Course Schedule: 

Week Content

 Week 1


 ThursJan 11:   Course Overview: Introductions, Software Overview, Quiz 1

 Lecture: R overview - data structures, subsetting, and basic plots. (PDF) (R Markdown)

 Lecture Exercises (HTML) (R Markdown)

 Week 2




 Tues. Jan 16:  HW1 due (HTML) (R Markdown). Handout: R Markdown reference guidebase R cheatsheetR Studio cheatsheet. Videos:  Install R and R studio (5:35), Create first R Markdown file (6:36), Arithmetic in R. (3:32). Reading: ModernDive (1.12.1). 

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

 Thurs. Jan 18:  Videos: R Markdown (4:15), Subsetting (6:02),  Exploratory Graphics (6:47). Reading: ModernDive (2.2)

 Quiz 2. Lecture: R style and functions - downloading and accessing packages, matrix style operations, tables for R Markdown. (PDF) (R Markdown)

 Lecture Exercises (HTML) (R Markdown)

 Week 3





 Tues. Jan 23: HW2 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)

 Thurs. Jan 25: Quiz 3

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

 Lecture Exercises (HTML) (R Markdown)

 Week 4




 Tues. Jan 30:   HW3 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 (HTML) (R Markdown).

 Thur. Feb 1: Quiz 4

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

Lecture Exercises (HTML) (R Markdown)

 Week 5:


Tues. Feb 6:  HW4 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). 

 Thur. Feb 8: Quiz 5

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

 Lecture Exercises (HTML) (R Markdown)

 Week 6: 


Tues. Feb 13:  HW5 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. Feb 15: Quiz 6

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

 Lecture Exercises (HTML) (R Markdown)

 Week 7:

 Tues. Feb 20: HW6 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 7

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

 Lecture Exercises (HTML) (R Markdown)

 Week 8



 Tues. Feb 27   HW7 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. Mar 1 Midterm Exam. Take home assigned (2017 Spring Take Home) (2018 Fall Take Home

 Week 9




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

 Guided Laboratory 8: R shiny. Lecture: (PDF) (R Markdown) Lab: (HTML) (R Markdown)  

 Thur. Mar 8 Quiz 8

 Lecture: Data scraping and SQL commands (PDF) (R Markdown)

 Week 10: Mar 13

 Week 10: Mar 15

 Tues. No Class - Spring Break

 Thurs. No Class - Spring Break

 Week 11: Mar 20

 Week 11: Mar 22 

Tues.  HW8 due (HTML) (R Markdown) Interactive SQL TutorialSQL Cheatsheet,

Laboratory 9: Data scraping and SQL commands (HTML) (R Markdown)

 Thur. Quiz 9

Lecture: Statistical Learning (PDF) (R Markdown)

 Lecture Exercises: (R Markdown) (HTML)

 Week 12: Mar 27

 Week 12: Mar 29 

 Tues. HW9 due (HTML).  Video: Predictive Modeling (9:25 , videoR script). Video: Classification and Cross-Validation (9:10 , videoR script).

Laboratory 10: Statistical Learning (HTML) (R Markdown)

  Thur. Quiz 10. Lecture: Clustering  (PDF) (R Markdown)

 Week 13: April 3

 Week 13: April 5

 Tues. HW10 due (HTML). Video: Clustering and MDS (10:56, videoR script).

  Laboratory 11: Clustering

 Thur. Quiz 11  Lecture: SAS basics and DATA Steps (Slides)

 Week 14: April 10

 Week 14: April 12

 Tues. HW11 due (HTML) (R Markdown) 

 Laboratory 12:  SAS basics and DATA Steps (HTML)

 Thur.  Quiz 12.  Lecture: SAS Procedures (Slides). 

 Week 15: April 17

 Week 15: April 19

 Tues. HW12 due (HTML) (R Markdown).   PROC SQL documentation. Video: PROC SQL (10:01, SAS Codevideo).

 Laboratory 13: SAS Procedures (HTML).

 Thur. Quiz 14 

 Lecture: SAS Graphics (Slides) 

 Week 16: April 24

 Week 15: April 26

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

 Laboratory 14: SAS Graphics (HTML).

 Thurs. No Class. Makeup for Take home exam. 

 Finals Week


STAT 408 Overview:

  • Meeting Time: Tuesdays and Thursdays -  12:15 -1:30 
  • Classroom: Wilson Hall 1-144
  • Office Hours: Tuesdays and Thursdays - 11:00 - 12:00

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  and a take home exam.
  • 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.