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) (2017 Fall Take Home

 Week 9



 Tues. Mar 6  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 No Class, makeup for take-home exam

 Week 10


 Tues. Mar 13 No Class - Spring Break

 Thurs. Mar 15 No Class - Spring Break

 Week 11


Tues. Mar 20 Quiz 8

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

 Thur. HW8 due (HTML) (R MarkdownInteractive SQL TutorialSQL Cheatsheet,

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

 Week 12


 Tues. Mar 27 Quiz 9

Lecture: Statistical Learning (PDF) (R Markdown) Lecture Exercises: (R Markdown) (HTML)

 Thur. Mar 29 HW9 due (HTML) (R Markdown).  Video: Predictive Modeling (9:25 , videoR script). Video: Classification and Cross-Validation (9:10 , videoR script).

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

 Week 13


 Tues. Apr 3 Quiz 10. 

 Lecture: Clustering  (PDF) (R Markdown) Lecture Exercises: (R Markdown) (HTML)

 Thur. Apr 5 HW10 due (HTML) (R Markdown). Video: Clustering and MDS (10:56, videoR script).

  Laboratory 11: Clustering (HTML) (R Markdown)

 Week 14


 Tues. Apr 10 Quiz 11 

  Lecture: SAS basics and DATA Steps (Slides), SAS Proc SQL (Slides PROC SQL documentation. Video: PROC SQL (10:01, SAS Codevideo).

 Thur. Apr 12  HW11 due (HTML) (R Markdown

 Laboratory 12:  SAS basics and DATA Steps (HTML) (R Markdown)

 Week 15


 Tues. Apr 17 Quiz 12.  

 Lecture: SAS Procedures (Slides). 

 Thur. Apr 19 HW12 due (HTML) (R Markdown).  

 Laboratory 13: SAS Procedures (HTML) (R Markdown)

 Week 16


 Tues. Apr 24 Quiz 13

 Lecture: SAS Graphics (Slides

 Thurs. Apr 26 HW13 due (HTML) (R Markdown).  PROC SGPLOT DocumentationSAS Graphics Whitepaper. Video: Using PROC SGPLOT and SGPANEL (11:53, SAS Codevideo).

 Laboratory 14: SAS Graphics (HTML) (R Markdown)

 Finals Week

 Tues. May 1 In Class Final 12:00 - 1:50

 Thur. May 3 Take home final due at 8 AM. (PDF) (R Markdown)

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.