A practical econometrics companion

Regression
with R & Python

Description, Prediction, and Causal Analysis for Applied Social Science and Econometrics

Per Johansson and Jiajing Sun

14 chaptersR + Py parallel code09 learning modules
Original abstract artwork of rising data points, a fitted curve, and two interwoven translucent ribbons
Original artwork created for this website
One framework, three questions

Start with the question.
Then choose the model.

The book builds a bridge from statistical reasoning to reproducible practice. It shows how the same regression toolkit changes when the goal is to describe a relationship, predict an outcome, or estimate a causal effect.

01

Description

Summarise patterns and communicate how variables move together.

02

Prediction

Evaluate out-of-sample performance and manage model complexity.

03

Causal analysis

Connect assumptions, research design, and credible counterfactuals.

Meet the authors

Two perspectives.
One practical approach.

The book brings together experience in statistical methodology, econometrics, policy evaluation, finance, and applied research—with a shared emphasis on interpretation and reproducible practice.

Statistics · Causal inference · Policy evaluation

Per Johansson

Chair Professor of Statistics at Uppsala University and Professor at the Yau Mathematical Sciences Center, Tsinghua University. His research connects causal inference and program evaluation with applications in labour economics, social insurance, health economics, and evidence-based policy.

  • Uppsala University
  • Tsinghua University
  • IZA Research Fellow

Econometrics · Statistics · Finance

Jiajing Sun

Associate Professor at the School of Economics and Management, University of Chinese Academy of Sciences, and Deputy Director of its Department of Statistics and Data Science. Her research spans econometrics, statistics, finance, and robust inference.

  • UCAS
  • CFA
  • FIMA

Biographical details are adapted and condensed from the authors’ notes in the book manuscript.

Learn by translating

The idea stays the same.
The syntax changes.

Examples are developed side by side so readers can focus on the statistical idea while becoming fluent in both ecosystems.

R Python
simple_regression
# Estimate a linear relationship
model <- lm(y ~ x, data = sample)

summary(model)
predict(model, newdata = future)

Contents

A guided path through regression

Fourteen chapters move from foundations to flexible prediction and research designs for causal analysis. Companion code is linked where available.

New Explore all 14 chapters, six concept notes, and three slide-based deep dives. Open learning map

Open companion

Run the examples.
Make them your own.

The public repository contains chapter-organised R and Python scripts, runnable workbooks, and example datasets.

Browse the repository

Public companion scope

This site intentionally does not reproduce the manuscript, slides, solutions, or publisher files. Availability of additional teaching materials is determined by the authors and publisher.