STAT 408 Overview:

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

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.

Course Schedule:


Week Content

 Week 1: Jan 11


 Thurs   Lecture: Course Overview, Introductions, Software Overview, Quiz 1

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

 Lecture Exercises (HTML) (R Markdown)

 Week 2: Jan 16  



 Week 2: Jan 18

 Tues.  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). 

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

 Thurs. 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)

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: Jan 23  



 Week 3: Jan 25

 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)

 Thurs. Quiz 4

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

 Lecture Exercises (HTML) (R Markdown)

 Week 4: Jan 30  



 Week 4: Feb 1

 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: Feb 6

 Week 5: Feb 8

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: Feb 13

 Week 6: Feb 15

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: Feb 20

 Week 7: Feb 22

 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: Feb 27

 Week 8: Mar 1

 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: Mar 6

 Week 9: Mar 8 


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: 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.  HW 9 due (HTML

 Laboratory 9:  SAS basics and DATA Steps (HTML)

 Thur. Quiz 10

Lecture: SAS Procedures (Slides)

 Week 12: Mar 27

 Week 12: Mar 29 

 Tues. HW 10 due (HTML).

 Laboratory 10: SAS Procedures (HTML).

  Thur. Quiz 11

 Lecture: SAS Graphics (HTML)

 Week 13: April 3

 Week 13: April 5

 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: Data scraping and SQL commands (PDF) (R Markdown)

 Week 14: April 10

 Week 14: April 12

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

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

 Thur. Quiz 13

 Lecture: Statistical Learning (PDF) (R Markdown)

 Lecture Exercises: (R Markdown) (HTML)

 Week 15: April 17

 Week 15: April 19

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

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

 Thur. Quiz 14

 Interactive Lecture/ Guided Laboratory 14: Clustering  (PDF) (R Markdown)

 Lab Questions: (HTML) (R Markdown)

 Video: Clustering and MDS (10:56, videoR script).

 Week 16: April 24

 Week 15: April 26



 Finals Week