POL 213: Quantitative Analysis in Political Science II

UC Davis | Spring 2026

Instructor

Teaching assistant

Course details

  • Wednesdays
  • Apr 1–Jun 3, 2026
  • 9:00–11:50 AM
  • Kerr Hall 593
  • Bring a laptop to class

Course description

POL 213 builds on material from POL 211 and 212. In those courses, you learned the basics of data analysis in the social sciences, including probability, simulation, and the linear regression model. POL 213 moves beyond ordinary least squares to the method of maximum likelihood estimation (MLE), a flexible framework for modeling the kinds of data political scientists often encounter: binary outcomes, counts, categories, and more.

We will also spend time learning to use modern, scientific workflows. We will emphasize:

  1. Making your work reproducible
  2. Working collaboratively, using git and Github
  3. Effective use of AI and agentic programming

Software and materials

There are no required textbooks for this course. All of the content you need will come from the slides and lecture notes. I will occasionally point you to optional readings from the texts below if you want to reinforce or extend what we cover in lecture.

We will use R throughout the course, along with Quarto for reproducible documents, Git and GitHub for version control, and an AI coding agent for agentic programming. You can choose between Claude Code and Codex (see below). See the Getting Started page for installation and setup instructions for all of these tools.

Optional texts

  • Cunningham (2021)
  • Gelman and Hill (2007)
  • Gelman, Hill, and Vehtari (2020)
  • Huntington-Klein (2021)
  • James et al. (2021)
  • McElreath (2020)
  • Ward and Ahlquist (2018)

Agentic programming

What is it?

At this point, you are probably familiar with AI tools like ChatGPT, where you type a question and get an answer. This is useful, but it is not how AI is increasingly used in practice. Rather, more and more academic and non-academic work is done using AI coding agents (such as Claude Code or Codex) that can see and edit the files in your project folder, run code, and much more. This way of working, where an AI agent takes actions in your computing environment rather than just generating text, is called agentic programming.

Why use AI?

I was skeptical of the early chat-box AIs; they just didn’t seem all that good. Now, I am convinced there is likely no going back. The quality of AI output has improved dramatically in just a few years, but the development of agentic programming is the real game-changer1.

1 Others have written more extensively about this and are worth reading.

2 This is not terribly different from how research is carried out in some of the natural sciences.

3 I recently scraped all of Colombia’s National Liberation Army (ELN) web content. Took minutes of prompting to write the code, and now I have a rich database of this group’s public writing.

These tools have completely changed the way I work with data and I suspect they will change work more generally. I do very little direct coding now, taking on more of a “management” role, supervising the research process and making calls about what needs to be done2. The benefits to quantitative work are obvious, but I believe the frictions to qualitative work are now also much lower.3

AI tools also pose challenges to learning. For experienced programmers and data analysts, the risk is of de-skilling, i.e., losing the ability to do things one could do before. For beginners, the fear is of never developing the muscle memory that is central to learning. How much should we worry about this?

I don’t have a clear answer at this point. My intuition is that, post-AI, some skills will no longer be “worth” developing, or only so in a few edge cases. Social scientists today do not need to know what \FloatBarrier does in Latex or how to add transparency to a confidence bound in ggplot, and that’s fine. AI tools can handle these logistical obstacles to research effortlessly. But we do need to understand how to fit and interpret models, wrangle data, and design research studies. Otherwise we will not know what we are doing, which is both a problem for the quality of the work we produce and our own sense of dignity.

NoteYou don’t have to use AI

If you don’t want to use an AI tool, that’s totally fine. You can do anything in this course without it; I’m also happy to help if gaps arise.

How will we use AI?

WarningDo your own writing

Just as we are increasingly doing in the “real world”, I will heavily penalize writing that reads like it was generated by a language model for the same reason I would penalize writing that is full of clichés or repetitive: it is boring to read and suggests the author didn’t think very hard about what they wanted to say. Think hard about what you want to say, and say it!

Learning to work effectively with an AI agent is a skill, and like any skill it benefits from scaffolding4. We will build up your use of AI coding tools in three stages over the quarter:

4 Scaffolding is a pedagogical approach where complex skills are introduced in structured, incremental stages rather than all at once. Each stage builds on the last, so that by the end you can do things that would have been overwhelming at the start.

Stage 1: Logistics (all problem sets). From the start, you should use your AI tool for the practical mechanics of your work, the things that are clearly “not worth knowing”. These include fixing Quarto compilation errors, managing your GitHub repository, debugging R environment issues, and other logistical tasks. Post-AI, if you understand why and when you would want to commit a change to git, it does not matter that you know the exact commands to make that happen.

Stage 2: Directed analysis (one question per problem set). Each problem set will include one question that explicitly prompts you to use your AI tool for a more substantive task: writing analysis code, producing visualizations, or working through a data problem. You must work through the code yourself and describe what each major piece of the code is doing.

Stage 3: Full use (final project). For the final project, your AI tool is fully available for coding, brainstorming, outlining, whatever is useful. The expectations for the quality and ambition of your work will be higher as a result. I am assessing your judgment (whether you chose the right model, justified that choice, and interpreted results honestly) not whether you typed every line of code yourself.

Be careful. AI tools can answer any question in my problem sets without friction. I cannot stop you from doing this, but if you do, you will not learn anything. This problem is not new to methods courses5. As motivation to do the work, the exams are closed-book and closed-device. If you rely on AI to do your thinking for you on problem sets, the exams will expose that. The scaffolding is designed to help you build genuine understanding alongside fluency with these tools, not instead of it.

5 Solutions manuals, cheating websites, Overstack, etc. have been around for a long time and could be used to mindlessly answer any textbook problem.

Assessment

Component Weight
Problem sets (7) 40%
Midterm exam 20%
Final exam 15%
Final project 25%

Problem sets

Each problem set will be posted the day after lecture (Thursday) and is due the day before the following lecture (Tuesday). No problem sets are due the weeks of the midterm or final. Each will involve a mix of analytical problems and applied work in R.

Your job is to write a Quarto document (.qmd) from scratch that answers each question and reads as a self-contained report. A reader should be able to follow your reasoning without seeing the original problem set. Render your report to HTML with embedded resources (embed-resources: true in the YAML header) and push both the .qmd and .html files to your GitHub repository before the deadline.

What should my problem sets look like?

Here is an example of what a completed problem set should look like: source (.qmd) | rendered (.html). Notice that each question is answered with a mix of narrative, code, and interpretation. Your reports should be readable on their own, without reference to the original problem set.

The report should also be beautiful and professional. Notice the nicely formatted tables, figures with clear axes labels (no raw variable names), no package warnings, etc. Making beautiful papers Pre-AI was tedious. Post-AI this is trivial6 so I will expect this of you.

6 I suspect this will be one of the fastest changes AI makes to working papers

NoteMethods portfolio (optional)

If you are completing the quantitative methods subfield, each problem set includes an optional question marked Methods portfolio which can be completed as part of the field’s requirement.

All problem sets and course work should be maintained in a private GitHub repository (see the Getting Started page for setup instructions). At the start of the quarter, add the instructor and the TA as collaborators so we can access your work. Grades and feedback will be communicated privately.

Midterm exam

In-class midterm exam on April 29 (first half of class). It will cover material from sessions 1–4. Closed-book, blue book.

Final exam

In-class final exam on June 3. Closed-book, blue book.

Final project

The final project is a paired effort. Partners will be assigned during the first week of the quarter. You and your partner will:

  • Find incomplete or “unfinished” data: This can be data you create (e.g., scrape from the internet), or a combination of existing datasets (e.g., the ACLED dataset, ANES) or variables from multiple replication files. Not allowed: using a replication dataset exclusively.

  • Briefly review literature related to topics covered in data and motivate patterns to explore in the data (a sketch of a theory/argument section is fine)

  • Select and justify an appropriate MLE model, estimate it, and present your results in a short paper (8–10 pages double-spaced).

Both partners should contribute meaningfully to all aspects of the project: data work, modeling, writing, and interpretation. I will use your GitHub commit history to see each partner’s contributions.

There are three milestones to keep you on track:

  1. Check-in 1 (week of Apr 22, office hours) — topic and data.
  2. Check-in 2 (week of May 13, office hours) — modeling progress and early results.
  3. Presentation (May 27) — a 12-minute presentation of your work-in-progress, followed by 5 minutes of Q&A. See Project presentations below for the full rubric. You will get feedback from me and from classmates that you can incorporate before submitting the paper.

The final paper is due June 8 and should live in a shared GitHub repository. More details will be provided early in the quarter.

Project presentations — May 27

Format: 4 teams × 20 min each = 80 min. We’ll go in randomized order (drawn at the start of class).

Per-team budget

Time Activity
12 min Presentation (slides)
5 min Q&A from the class + me
3 min Transition to next team

What your presentation should cover

  1. Research question + motivation (~1.5 min) What are you trying to learn? Why does it matter for political science, for the world, for a specific lit?
  2. Data (~2 min) Source, unit of analysis, \(N\), key variables, any sample restrictions. Make it crystal clear. Show us an easy to read table. One slide is usually enough.
  3. Outcome + model choice (~2 min) What kind of outcome do you have, and which MLE model are you fitting?
  4. Preliminary results (~5 min) At least one of: clean coefficient table (modelsummary), predicted-probability plot, or AME/marginal-effect figure. Interpret it substantively — don’t just say “significant at the 0.05 level.” Walk us through the magnitude and the direction.
  5. Where you’re stuck + what’s next (~1.5 min) One specific thing you’re still working through or unsure about.

TODO

  • Slides due to me by noon on May 27 (PDF or .html) — in case of A/V issues, I’ll have a backup copy on my laptop.
  • Both team members should present at least one section. Decide who handles what in advance.
  • Final paper is due June 8 — this presentation is your chance to get feedback before you finalize.

Course policies

Canvas: I use Canvas only to post grades. All course materials live on this website, assignments are submitted via GitHub, and I will communicate with the class via email.

Prerequisites: POL 212 or equivalent training in OLS regression and R programming.

Late work: Assignments submitted one day late lose one letter grade. Submissions more than one day late receive a zero. Exceptions require a formal excuse (e.g., a Dean’s excuse or documented medical issue) submitted before the deadline when possible.

Academic honesty: I adhere to the UC Davis Code of Academic Conduct. All work submitted must be your own. See Agentic programming for the AI policy. In-person exams are closed-book and closed-device.

Accessibility: I make every effort to ensure all content in this course is accessible and meets WCAG 2.1 guidelines. If you find any content in this course to be inaccessible, please notify me as quickly as possible.

Disability accommodations: If you have a disability and would like to request an accommodation, please contact the Student Disability Center and submit your SDC Letter of Accommodation as soon as possible.

Adjustments: This syllabus is subject to change. Any changes will be announced as soon as possible.

References

Cunningham, Scott. 2021. Causal Inference: The Mixtape. Yale University Press. https://mixtape.scunning.com/.
Gelman, Andrew, and Jennifer Hill. 2007. Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge University Press.
Gelman, Andrew, Jennifer Hill, and Aki Vehtari. 2020. Regression and Other Stories. Cambridge University Press.
Huntington-Klein, Nick. 2021. The Effect: An Introduction to Research Design and Causality. Chapman; Hall/CRC. https://theeffectbook.net/.
James, Gareth, Daniela Witten, Trevor Hastie, and Robert Tibshirani. 2021. An Introduction to Statistical Learning. 2nd ed. Springer.
McElreath, Richard. 2020. Statistical Rethinking. 2nd ed. CRC Press.
Ward, Michael D., and John S. Ahlquist. 2018. Maximum Likelihood for Social Science. Cambridge University Press.