Princeton Sociology Summer Methods Camp 2019

The Princeton Sociology Summer Methods Camp gives incoming Sociology PhD students a running start at the beginning of their PhD program. The computational and statistical training provides necessary foundation for statistics and methods classes. We understand that participants come into the program with different backgrounds and experiences, and the Summer Methods Camp will be helpful for everyone, regardless of background.

This 2019 Summer Methods Camp will take place Tuesday, September 3rd to Friday, September 6th from 9am to 4pm in 165 Wallace Hall. Katie Donnelly and Olivia Mann are this year’s graduate student instructors and Professor Matthew Salganik is faculty advisor.

Learning objectives

The Methods Camp is designed to give you training in both math and computing. In math, you will receive training in three main areas: calculus, probability, and matrix algebra. In computing, you will receive training in three main areas: data wrangling, iteration, and visualization.

At the end of the Methods Camp, students will be able to:

  • Start the semester excited and ready to learn new methods
  • Explain in words and pictures what is a derivative, what is an integral, and how derivatives are useful for optimization.
  • Define probabilities in sets, perform basic set operations, calculate conditional probabilities, and use Bayes rule.
  • Perform matrix addition, subtraction, multiplication, and inversion.
  • Combine the 5 dplyr verbs, join data sets, and convert between long and wide formats
  • Use loops, purrr, and functions to avoid repeating yourself
  • Make simple graphs in ggplot2, write RMarkdown documents, and write basic equation in LaTeX


Reading Assignment

The textbook we will use for Methods Camp is Essential Mathematics for Political and Social Research by Jeff Gill. You are not expected to master the topics covered in the readings by the time you arrive at camp! These readings and the summer assignments are meant as a first introduction to what we’ll be covering during the camp itself. If you find yourself struggling with a topic, reach out to us!

Chapter 1: The Basics

This chapter introduces you to some of the basic notation you will see used during camp and in classes. It also reviews the concepts of indexing, functions, polynomial functions, exponents, and logs. Reviewing the notation will be helpful to all students. If you are comfortable with the other concepts, this chapter shouldn’t take too much of your time.

Chapter 3: Linear Algebra & Chapter 4: Linear Algebra Continued

These chapters cover vector and matrix math.

Chapter 3 reviews math with vectors (addition, subtraction, different forms of multiplication), vector norms, types of matrices, math with matrices, and other matrix manipulation. The examples in this chapter are helpful for understanding the usefulness of certain concepts. Section 3.6: Advanced Topics, is challenging. Read it at least once, but don’t spend too much time on it.

Chapter 4 is about the theoretical and abstract properties of vectors and matrices. If you find these topics challenging, take your time and really read the material line by line. Don’t devote too much time to sections 4.5, 4.8, and 4.9, but make sure to take your time with section 4.6: Matrix Inversion.

Chapter 5: Elementary Scalar Calculus & Chapter 6: Additional Topics in Scalar and Vector Calculus

These chapters cover calculus concepts.

Chapter 5 introduces basic calculus concepts. If you are comfortable with the concepts of limits, derivatives and rates of change, taking derivatives, L’Hospital’s Rule, Rolle’s Theorem and the Mean Value Theorem, definite and indefinite integrals, and finding indefinite integrals, you may be able to skim this chapter. However, understanding these basics will be important for your stats courses.

Chapter 6 covers partial derivatives, maxima and minima, root-finding, multi-dimensional integrals, finite and infinite series, and calculus with vectors and matrices. Sections 6.2, 6.3, 6.4, and 6.6 are particularly important. Sections 6.5, 6.7, and 6.8 may be more challenging.

Chapter 7: Probability Theory

This chapter covers probability theory, which will be a major focus of the early part of your fall statistics course. Pay special attention to sections 7.5, 7.6, 7.7, and 7.8. Overall this section might not be challenging, but I recommend taking your time with it. The more comfortable you are with probability theory, the better!

Coding Assignment

In order to prepare you for the coding portion of the summer assignment and work we will be doing during the camp, we are asking you to complete the following RStudio Primers.

  • The Basics - compete all sub-modules.

  • Work With data - complete all sub-modules.

  • Visualize Data - complete Exploratory Data Analysis and Scatterplots sub-modules, browse others.

  • Tidy Your Data - browse these; we will cover this material in the camp so it would be good to be familiar with it, but you won’t need it for the summer assignment.

  • Iterate - complete Introduction to Iteration.

  • Write Functions - complete Function Basics and How to Write a Function, browse others.

Additional Resources

Math Resources

Coding Resources


The outline for the in-person portion of camp can be found below.

Day 1

Math: Calculus

  1. Review of summer assignment topics: chain rule, derivatives of logs/exponents

  2. Two useful tools for optimization: higher-order derivatives and partial derivatives

  3. Simple univariate optimization

Slides will be posted prior to lecture



Qualitative methods speaker TBD

Coding: Review of basics

  1. Summer review: indexing and manipulation of four main data structures (vectors, lists, matrices, and data.frames)

  2. Three data manipulation tools: logical statements, control flow, for loops

  3. Dplyr as a tool for data manipulation

Slides will be posted prior to lecture


Assignment One


Due: Day 2

Day 2

Math: Matrix algebra

  1. Vectors and matrices

  2. Addition, subtraction, and multiplication

  3. Linear independence

  4. Rank and inverse of matrices

  5. Matrix applications: distance measures, dimension reduction, solving linear systems of equations

Slides will be posted prior to lecture



Qualitative methods speaker TBD

Coding: Functions, loops, and ifelse statements

  1. Functions

  2. Loops and ifelse statements

Slides will be posted prior to lecture

Assignment Two


Due Day 4.

Day 3

Math: Basic probability

  1. Counting, sets, methods of counting and sampling

  2. Conditional probability and Bayes’ Rule

  3. independence

Slides will be posted prior to lecture



Qualitative methods speaker TBD

Coding: Data cleaning and manipulation

  • Matrix algebra in R

  • Reading data from different file formats

  • Merging data

  • Reshaping data between long and wide format

  • Basic string operations for renaming and recoding variables

Slides will be posted prior to lecture

Day 4


  • ggplot2 material from summer assignments

  • Open-ended review session

Final Project



Qualitative methods speaker TBD


Dates of camp: Tuesday September 3rd to Friday September 6th.

Time structure of camp:

Breakfast: 9:00 AM

Morning session, math: 9:30 - 11:30 AM

Lunch session(qualitative methods): 12:00 - 1:30 PM

Afternoon session, programming: 2:00 - 4:00 PM

Location: 165 Wallace Hall

Office hours: Katie will hold office hours from 4pm-6pm and Liv will hold office hours from 7pm-9pm.

We use Piazza for all our of course communications. Please ensure you have signed up to the course here.


  • Should I participate in the camp if I have no plans to do quantitative work beyond what’s required? Yes! The aim of the camp is to make all students feel comfortable approaching the statistics training in the first year of the program, which in turn, is a crucial foundation for the second year empirical paper and future work. Both of us are available over email over the summer and will be holding daily office hours during the camp itself, and we’re both happy to spend extra time working with anyone more nervous about the quantitative requirements in the program to make sure you feel comfortable about the pace of the camp and related assignments.

  • Should I participate in the camp if I am highly confident about everything math and programming-related? Yes! Quantitative training means different things at different places, and the department wants to make sure everyone is on the same page going into the statistics sequence so that time isn’t spent during the course reviewing foundational concepts. In addition, the camp will feature lunchtime workshops highlighting qualitative methodology in the department, which is a good chance to meet professors you may not know already and get a sense of the range of the department’s work.

  • How does this camp fit into the first-year statistics sequence? The purpose of the camp is so that you can hit the ground running in whatever statistics sequence you opt to take your first year– both in terms of foundational math concepts and computing in R.


The Sociology Summer Methods Camp began in 2016, and the materials that we currently use include contributions from many of the people who have taught and participated in the program. Here is a list of all the instructors:

  • 2016: Rebecca Johnson, Janet Xu (graduate students instructors) and Brandon Stewart (faculty advisor).
  • 2017: Janet Xu, Xinyi Duan (graduate student instructors) and Matthew Salganik (faculty adviser).
  • 2018: Xinyi Duan, Katie Donnelly (graduate student instructors) and Brandon Stewart (faculty adviser).
  • 2019: Katie Donnelly, Liv Mann (graduate student instructors) and Matthew Salganik (faculty adviser).

We would also like to acknowledge the many other people who have shaped the material including: the instructional staff of the Math Camp for the Department of Politics at Princeton and the instructional staff of the Math Camp for the Department of Government at Harvard.

All of the teaching materials that we created are available under a Creative Commons-By license. Please feel free to use and improve them.