This course offers an introduction to advanced topics in statistics with the focus of understanding data in the behavioral and social sciences. It is a practical course in which learning statistical concepts and building models in R go hand in hand. The course is organized into three parts: In the first part, we will learn how to visualize, wrangle, and simulate data in R. In the second part, we will cover topics in frequentist statistics (such as multiple regression, logistic regression, and mixed effects models) using the general linear model as an organizing framework. We will learn how to compare models using simulation methods such as bootstrapping and cross-validation. In the third part, we will focus on Bayesian data analysis as an alternative framework for answering statistical questions.
Requirement: Psych 10, Stats 60, or equivalent.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
| Role | Instructor | Instructor | TA | TA | TA | TA | TA |
| Pronouns | he/him | he/him | he/him | she/her | he/him | he/him | she/her |
| Email (@stanford.edu) | gerstenberg | nilamram | tanawm | cwu0701 | justin.yang | ssbrahma | vyqlua |
| Office hours | Wednesday 1:30-2:30pm | Monday 12:30-1:45pm |
The meetings will be in person and as shown below.
Lectures: The class meets Monday, Wednesday, and Friday 10:30-11:50am in 200-305 (Lane History Corner).
Sections: Sections are on Tuesdays and Thursdays 3:30-4:20pm in 380-380D (attendance is optional).
| Day | Date | Topic |
|---|---|---|
| Monday | January 5th | Introduction |
| Wednesday | January 7th | Visualization 1 |
| Friday | January 9th | Visualization 2 |
| Monday | January 12th | Data wrangling 1 |
| Wednesday | January 14th | Data wrangling 2 |
| Friday | January 16th | Probability |
| Monday | January 19th | Martin Luther King Jr. Day |
| Wednesday | January 21st | Simulation 1 |
| Friday | January 23rd | Simulation 2 |
| Monday | January 26th | Modeling data |
| Wednesday | January 28th | Linear model 1 |
| Friday | January 30th | Linear model 2 |
| Monday | February 2nd | Linear model 3 |
| Wednesday | February 4th | Linear model 4 |
| Friday | February 6th | Generalized linear model |
| Monday | February 9th | Power analysis |
| Wednesday | February 11th | No class (due to Midterm) |
| Friday | February 13th | Model comparison |
| Monday | February 16th | President’s Day |
| Wednesday | February 18th | Linear mixed effects models 1 |
| Friday | February 20th | Linear mixed effects models 2 |
| Monday | February 23rd | Linear mixed effects models 3 |
| Wednesday | February 25th | Linear mixed effects models 4 |
| Friday | February 27th | Causation |
| Monday | March 2nd | Bayesian data analysis 1 |
| Wednesday | March 4th | Bayesian data analysis 2 |
| Friday | March 6th | Bayesian data analysis 3 |
| Monday | March 9th | Bayesian data analysis 4 |
| Wednesday | March 11th | Summary and course outlook |
| Friday | March 13th | TA presentations |
Content:
Resources:
Datacamp:
Content:
Resources:
Datacamp:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
%>% works.dplyr package (incl. filter(), rename(), select(), mutate(), and arrange())Resources:
Datacamp:
Reading:
Content:
group_by() and summarize().NA.pivot_longer(), pivot_wider(), separate() and unite().left_join().Resources:
Datacamp:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
dnorm(), pnorm(), qnorm(), rnorm()density(), quantile()Datacamp:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
Datacamp:
Reading:
Content:
Resources:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
Datacamp:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
Resources:
Datacamp:
Reading:
Content:
lmer() syntax in R.lmer() summary.lmer().Resources:
Datacamp:
Reading:
Content:
lmer() worked example.
Resources:
Reading:
Content:
lmer()s (and what to do about it).lmer() syntax even better.Reading:
Content:
Resources:
Reading:
Content:
Datacamp:
Reading:
Content:
Reading:
Content:
Resources:
Reading:
You will learn how to use R to …
Understand the philosophy behind null hypothesis significance testing (NHST) and Bayesian statistics through …
Formulate research questions as statistical models and …
Communicate what you have learned about your data …
Contribute to open and reproducible science through …
We will …
You will …
For many classes, there will be readings and/or accompanying online interactive tutorials. We won’t adopt a course textbook.
Course notes:
The course notes are available as an online book here.
Free online books:
ggplot2, dplyr, sampling methods, …).Text books:
Please familiarize yourself with Stanford’s honor code. We will adhere to it and follow through on its penalty guidelines.
When is the weekly homework due?
Each week, we will make the homework available on Friday after class. The homework is then due on Thursday 8pm the week after.
What if I turn my homework in late?
You will have 5 slip days in total. If you return a homework within 24h after the deadline, this costs you one slip day (or 2 slip days if you return it within 48h, etc.). If you’ve use up all your slip days, late homework submissions from that point on will receive a score of 0.
Can we work in groups?
Work for the course will include both homework assignments and a final project.
Students who may need an academic accommodation based on the impact of a disability must initiate the request with the Office of Accessible Education
(OAE). Professional staff will evaluate the request with required documentation, recommend reasonable accommodations, and prepare an Accommodation Letter for faculty dated in the current quarter in which the request is being made. Students should contact the OAE as soon as possible since timely notice is needed to coordinate accommodations. The OAE is located at 563 Salvatierra Walk (phone: 723-1066, URL: http://oae.stanford.edu).
Stanford is committed to ensuring that all courses are financially accessible to its students. If you require assistance with the cost of course textbooks, supplies, materials and/or fees, you can contact the First Generation and/or Low-Income Student Success Center) to learn about the FLIbrary and other resources they have available for support.
Stanford offers several tutoring and coaching services:
We welcome feedback regarding the course at any point. Please feel free to email us directly, or leave anonymous feedback for the teaching team by using this form.