Causal Academy/Causal Inference with Linear Regression: A Modern Approach (Part II)

  • €999

Causal Inference with Linear Regression: A Modern Approach (Part II)

  • Course
  • 112 Lessons

An applied course on causal inference using modern linear regression approaches, focused on real-world complexity. Learn how to design studies, construct realistic causal graphs, map them to adjustment strategies under realistic data constraints, diagnose conditions like positivity, and estimate (heterogeneous) causal effects using OLS and double machine learning, demonstrated through an end-to-end case study.

Watch a short overview of the course and what you’ll learn.

About the Course

This 25-hour course is the second part of the series on causal inference with linear regression. It is designed for people who want to move beyond simplified examples and understand technically how causal analyses are carried out in practice, where the data, the modelling decisions, and the project setup are often more complex.

The course covers the full workflow of an applied causal analysis. This includes translating a vague business or research question into a well-defined causal design, constructing a causal graph, and mapping that graph to an adjustment strategy that is feasible given the data that are actually available. From there, the course moves to the estimation stage, where the focus is on causal inference using modern linear regression approaches.

More specifically, for estimation we work with linear regression models that include flexible feature engineering, as well as double machine learning methods based on LASSO and OLS. These methods are used to estimate both average and conditional average treatment effects, and are discussed from a conceptual perspective as well as in terms of their practical implementation, including demonstrations using the DoubleML package in Python.

The entire workflow is illustrated through a realistic end-to-end case study. In this case study, we consider an e-commerce setting in which we want to understand how opting into a customer programme affects the profit generated by a customer over the next sixty days. This is not a simplified example. The causal graph becomes relatively large, the adjustment strategy is non-trivial, the data include many covariates, and the modelling choices require care. The aim is to make applied causal analysis tangible in a setting that reflects real-world complexity.

Throughout the course, you will work through coding exercises, so that by the end you will have carried out a complete causal analysis yourself, from study design to estimation.

What makes this course different

A complete applied workflow

Rather than focusing on isolated techniques, the course follows a full causal analysis pipeline:

Vague business question → well-defined study design → causal graph → adjustment strategy → positivity diagnostics and handling violations → specification and fitting of the estimation model → interpretation and use of the resulting estimates.

Coverage of topics that are often underdiscussed

The course focuses on issues and considerations that are important for applied work but are often not or only briefly addressed in educational material on causal inference. This includes, for example, time indexing in causal graphs, the use of aggregated and cluster variables, the appearance of cycles, the limitations of standard LASSO approaches for causal estimation, and the practical implications of positivity violations.

A realistic end-to-end case study

The course is built around a single e-commerce case study that is intentionally not simplified. The causal graph and dataset contain a large number of variables, the ideal adjustment set is not fully observed, and the specification of the estimation model involves uncertainty.

Extensive integration of simulation and implementation

The course makes heavy use of simulations, coding demonstrations and exercises. The goal is to make sure that everything we discuss conceptually also becomes tangible and applicable in practice.

Applicability beyond binary treatment settings

The course does not restrict itself to binary treatments. The methods discussed are also applicable to continuous treatments (and, in some cases, multicategorical treatments).

What you will learn

By the end of the course, you will be able to carry out a regression-based causal analysis from start to finish in a structured and technically precise way.

Study design

  • Translate a vague business or research question into a well-defined causal study using target trial emulation

  • Incorporate practical considerations related to consistency and interference when defining the analysis

Causal graphs and adjustment strategies

  • Understand the role of time indexing, aggregates, clusters, and cycles in causal graphs

  • Use these ideas to construct more realistic causal graphs in practice

  • Map a causal graph to an adjustment strategy that is feasible given the data that are actually available through proxy adjustment

Positivity

  • Understand the practical implications of violations of the positivity assumption at a detailed level

  • Diagnose positivity problems and reason about coping strategies for binary, multicategorical, and continuous treatments

Estimation

  • Understand the limitations of simple OLS models for causal analysis

  • Use feature engineering to make linear regression models more suitable for real-world causal problems

  • Understand the role of multicollinearity and high dimensionality in regression-based causal analyses

  • Learn why standard LASSO is generally inappropriate for causal estimation, and how double machine learning based on LASSO and OLS can help

  • Learn how to work with the DoubleML package in Python

Implementation and Interpretation

  • Implement each step of the causal analysis pipeline (in Python code)

  • Apply the full workflow to a realistic case study

  • Interpret causal effect estimates in an assumption- and limitation aware way

Who this course is for

This intermediate-level course is intended for data scientists, analysts, and similar quantitative practitioners who already have some familiarity with the basic concepts of causal inference and want to learn how to apply regression-based causal workflows in practice.

The course is not aimed at complete beginners in causal inference. Some prior exposure to causal concepts is assumed (see prerequisites below).

Prerequisites

This course assumes familiarity with the basic concepts of causal inference and linear regression.

In particular, you should be comfortable with:

  • The definition and interpretation of causal quantities such as the average treatment effect (ATE) and conditional average treatment effect (CATE)

  • The concept of conditional exchangeability (unconfoundedness)

  • Causal graphs (DAGs), the backdoor criterion, and DAGitty as causal graph tool

  • Conditional expectation functions (CEF) and the role of linear regression as a CEF approximator

  • Under which conditions simple OLS models that include treatment and control variables can be used for causal estimation

  • Basic familiarity with Python for data analysis (e.g. working with libraries such as pandas, NumPy, or scikit-learn)

If you have completed Part I of the course series, you will be well prepared for this course. If not, but you are already comfortable with the concepts listed above, you should also be able to follow the material.

Upon completion of the course, you will receive a certificate of completion from Causal Academy.

Contents

Why Simple Linear Models Fall Short in Applied Causal Analysis

Introduction
Slides
How to Use This Course
Course Guidelines
ATE & CATE
Causal Graphs, Backdoor Adjustment, Adjustment Formula
Linear Regression as a CEF Approximator
Limitations of the Simple Linear Model
Unmodelled Non-Linearity
Heterogeneity in Linear Models
Unmodelled Effect Heterogeneity — Part I
Unmodelled Effect Heterogeneity — Part II
Residual Confounding
Exercises

Making Linear Regression Models More Flexible

Introduction
Slides
Exploring the Dataset
Simple Models with Continuous Predictors
Simple Models with Categorical Predictors
Modelling Nonlinearity with Binning
Modelling Nonlinearity with Polynomial Terms
Modelling Nonlinearity with Log Transformations
Interaction Terms: Continuous X Continuous
Interaction Terms: Continuous X Binary
Interaction Terms: Continuous X Multicategorical
Interaction Terms: Categorical X Categorical
Nonlinearity and Interaction Terms
Moderating Non-Linear Relationships — Part I
Moderating Non-Linear Relationships — Part II
Non-Linear Moderation of Non-Linear Relationships
Flexible Linear Models in Causal Inference
Recap
Exercises

Study Design and Causal Graph Construction in Applied Settings

Introduction
Slides
What Makes a Causal Project Well-Defined?
Consistency and Treatment Variation Irrelevance
No Interference
Target Trial Emulation
"Non-Causal Edges" In Causal Graphs
True Causal Drivers or Proxies?
The Need for an Explicit Notion of Time in Causal Graphs
Time Acyclicity and Effect Acyclicity
What Graph Are We Actually Working With?
Cluster Directed Mixed Graphs (over ADMGs) — Part I
Cluster Directed Mixed Graphs (over ADMGs) — Part II
Cluster Directed Mixed Graphs (over DMGs)
Theoretical Exercises
Introducing The Case Study
Applied Exercises
Emulating the Target Trial — Part I
Emulating the Target Trial — Part II
How to Start Building a Causal Graph
Pre-Treatment Structure: Nodes — Part I
Pre-Treatment Structure: Nodes — Part II
Pre-Treatment Structure: Nodes — Part III
Pre-Treatment Structure: Edges — Part I
Pre-Treatment Structure: Edges — Part II
Pre-Treatment Structure: Edges — Part III
So, We Have Cycles…
The Final Pre-Treatment Structure
Post-Treatment Structure — Part I
Post-Treatment Structure — Part II
Post-Treatment Structure — Part III
The Final Causal Graph
From Causal Graph to Dataset — Identifying a Sufficient Adjustment Set
From Causal Graph to Dataset — Proxy Variables and Practical Compromises
From Causal Graph to Dataset — Exploring The Data
Recap
Resources

Challenges in the Estimation Stage

/

Introduction
Slides
Statistical Inference
Sampling Distribution — Part I
Sampling Distribution — Part II
Standard Error
Confidence Intervals — Part I
Confidence Intervals — Part II
Positivity: Formal Definitions
The Positivity-Unconfoundedness Trade-off
Positivity: Simulation Study — Part I
Positivity: Simulation Study — Part II
The Consequences of Positivity Violations
High-Dimensionality and Multicollinearity — Part I
High-Dimensionality and Multicollinearity — Part II
High-Dimensionality and Multicollinearity — Part III
Challenges of Polynomial and Interaction Terms
Recap
Exercises

The Estimation Stage in Applied Causal Analysis

Introduction
Dealing With Heteroskedasticity
Diagnosing Multicollinearity
Dealing With Multicollinearity
Diagnosing Positivity with Binary Treatments — Part I
Diagnosing Positivity with Binary Treatments — Part II
Dealing with Positivity Violations in Binary Treatment Settings
Diagnosing Positivity with Multicategorical Treatments — Part I
Diagnosing Positivity with Multicategorical Treatments — Part II
Dealing with Positivity Violations in Multicategorical Treatment Settings
Diagnosing Positivity with Continuous Treatments — Part I
Diagnosing Positivity with Continuous Treatments — Part II
Dealing with Positivity Violations in Continuous Treatment Settings
Diagnosing Positivity for CATE Estimation
Applying Positivity Diagnostics in the Case Study
Tools, Tips, and Considerations for Positivity Diagnostics
Best Practices for Interaction and Polynomial Terms
Functional Form Selection: Reasoning About Treatment and Control Terms
Functional Form Selection: Why Standard Selection Methods Don’t Work
Why Post-LASSO OLS Is Generally Invalid for Causal Inference: A Technical Derivation
Why Double ML with LASSO in Partially Linear Models Can Help: A Technical Derivation
Exercises
Feedback and Reviews