
What this course is about — and how to get set up
2026-09-09
say what an explanatory research question is — the kind this course teaches you to answer;
explain how the course works — the weekly rhythm, the quizzes, and what I assume you know;
run R code inside your own course project — set up today, together.
One part of today’s lecture per goal.
Part 1 of 3
Sociology asks many kinds of questions.
This course is about one kind: what is the effect of X?
How does international immigration transform societies?

Source: Schaeffer, Romarri, Rosenberg, and Krakowski (2025)

Source: Schaeffer, Romarri, Rosenberg et al. (2025)

Source: Wiedner, Schaeffer, Carol, and Böller (2025)

Source: Schaeffer and Andersen (2025)

Source: Schaeffer and Andersen (2025)

Source: Schaeffer and Andersen (2025)
(1) Ontological: what is the nature of X?
(2) Critical: is X (un-)just?
Discuss: think of the last exam you wrote — which type of research question did it engage with?
(3) Descriptive: what types of X exist, and how frequent are they?
(4) Explanatory: what is the effect of X?
This course is about explanatory questions: what is the effect of X?
Use data to discover patterns,
and the social mechanisms that bring them about.

(1) Multiple OLS regression
(2) Visualization of regression results
(3) Fundamentals of causal inference




Municipalities where far-right candidates ran versus where they won

Source: Romarri (2020)

Source: Romarri (2020)
Discuss: why compare municipalities where the far-right barely won with those where it barely lost?
Near the threshold, winning is almost random — so the two groups are comparable, like in an experiment. The full logic comes in Lecture 13.


Source: Schaeffer, Romarri, Rosenberg et al. (2025)
Part 2 of 3
The weekly rhythm, the quizzes that qualify you for the exam, and what I assume you already know.
| TA | Fridays | Room |
|---|---|---|
| Sofie | 8 am | CSS 2-2-49 |
| Natalie | 10 am | CSS 2-0-30 |
| Joakim | 10 am | CSS 2-0-42 |
Recommendations

13 online quizzes on Absalon, designed by Epinion & us.
Based on data Epinion collects for the municipality of Copenhagen, DR, Skat, etc.
Made available online Wednesdays after the lecture.
Beware: submit at least 10 completed quizzes — individually, each within two weeks of release — or you do not qualify for the exam.



Rusty on any of this? Part 3 of today gets your tools ready, and the first weeks refresh the statistics.
\(\rightarrow\) Available at Academic Books on City Campus and at the university library.
Carried over from last semester; serves as a reference for regression and statistical inference.

Veaux, Velleman, and Bock (2021)
To learn how to identify causal effects, we use Angrist & Pischke’s textbook.

Angrist and Pischke (2014)
Privacy: don’t use AI/LLMs to process sensitive information!
Learning:
Generation: don’t use AI to generate, draft, and write your R code. You need to learn how to code to assess whether the AI coded what you asked for.


Part 3 of 3
Everyone leaves today with a working R setup — we do this together, now.
Install RStudio, or update to the most recent version.
The same steps, with more detail, are on the course website under About & setup.

Set these preferences to improve reproducibility!
\(\rightarrow\) RStudio / Tools / Global options.

Use Projects to manage all files (scripts, data, figures, and tables) belonging to the same project.
Always start your RStudio session by clicking on the Project for this course.
Use the editor to write as many R scripts as you like, saved in the same folder as your Project. Thereby you can reproduce your results.


Set up a new project in RStudio:
Done! Now you should find an empty folder under the path where you wanted it set up.
Beware: in the future, always start RStudio by double-clicking the project icon in your folder for this course.

Set up a new project in RStudio:

Set up a new project in RStudio:

Done! Now you should find an empty folder under the path where you wanted it set up.



OK, you are good to go!
Pro tip: use the R script to take notes during the lecture!
A # defines a comment. So use it to take notes and code in one single document per lecture.

Look back at the goals from the start of the lecture. Can you tick all three?
Anything feel shaky? That is what this week’s Absalon quiz and the Friday exercise class are for.
Angrist, J. D. and J. Pischke (2014). Mastering ’Metrics: The Path from Cause to Effect. Princeton University Press.
Romarri, A. (2020). Do Far-Right Mayors Increase the Probability of Hate Crimes? Evidence From Italy. SSRN Scholarly Paper ID 3506811. Rochester, NY: Social Science Research Network.
Schaeffer, M. and S. Andersen (2025). “Unveiling the Price of Green”. In: Unpublished manuscript.
Schaeffer, M., A. Romarri, D. Rosenberg, et al. (2025). “When Politics Enters the Waiting Room: Far-Right Electoral Victories Exacerbate Discrimination in Access to Healthcare”. In: American Political Science Review. Forthcoming.
Veaux, D., Velleman, and Bock (2021). Stats: Data and Models, Global Edition. Pearson Higher Ed.
Wiedner, J., M. Schaeffer, S. Carol, et al. (2025). “Local Communities, Distant Origins: How Cultural Distance and Local Context Shape Immigrant Ethno-Religious Infrastructures”. In: American Journal of Sociology.

Lecture 1 · Introduction