Tutorials

You might also want to check out the features of the Causal Wizard webapp.

Watch the video!

If you prefer, this short video will explain how to use the app.

How to use the tutorials

  • You can get a good idea what Causal Wizard can do for you by watching the video on this page.
  • If you're interested in Causal Diagram, the Pearlian approach to Causality or using the Potential Outcomes framework, we strongly recommend completing Tutorial 1 to learn the basics of Causal Wizard. It only takes a couple of minutes. Other tutorials assume you've mastered the steps and concepts in Tutorial 1.
  • If your data is in Panel Data format, which tracks the characteristics of many entities over time, you can use our Fixed-Effects and Difference-in-Differences models. Follow the Fixed Effects Tutorial.
  • We recommend Tutorial 4 to learn how to explore Counterfactual Outcomes using CausalWizard.
  • The tutorials are reproductions or derivations of case studies from textbooks, with data publicly available. The data for these tutorials will automatically appear for all users as "Tutorial X: NAME" when you create a new Study and must select a Dataset.
  • You may want to have the tutorial open in one window, while following along in another. The links below will open in a new tab.

Does tertiary education increase weekly wages, and if so, how much?

This tutorial walks through the key steps of using Causal Wizard in detail. This knowledge is assumed in other tutorials.

This example is loosely based on the discussion in the Python Causality Handbook, Chapter 4: Confounding Bias, by Matheus Facure. It examines the effect of tertiary education on wages. It demonstrates the importance of your domain knowledge, by showing the change in effect after adding a common cause to the Causal Diagram.

Does headline-length affect Click-Through-Rate?

Before making changes to optimize websites or content to increase engagement, it's important to really understand what is driving user behaviour. This tutorial is derived from an article by Adam Kelleher. Adam critically examined the data behind another blog article which claimed that a headline-length of 16-18 words maximized engagement, and noticed that what was actually happening was that certain popular authors tended to pick longer headlines, yet long headlines didn't necessarily help other authors.

Using Causal Inference we can repeat the experiment and examine the effect of headline-length on Click-Through Rate when controlling for Author.

Fixed Effects models

This tutorial shows you how to replicate 3 results from the Fixed Effects and Difference-in-Differences examples discussed in Matheus Facure's online book "Causal Inference for the Brave and True".

In particular, we focus on some of the results from Chapter 13 (Difference-in-Differences), Chapter 14 (Panel Data and Fixed Effects) and Chapter 24 (The Difference-in-Differences saga).

These methods require that your data is in Panel Data format, which tracks the characteristics of many entities over time.

Does quitting smoking cause weight gain?

This example is reproduced from Chapter 12 of Causal Inference: What If (the book), by Miguel Hernan. This case study uses data from the National Health and Nutrition Examination Survey Data I Epidemiologic Follow-up Study (NHEFS). It attempts to accurately quantify the effect of smoking cessation on weight gain. We can see that despite some simplifications to make the tutorial easy, we obtain a result close to the reported value.

Exploring Counterfactual Outcomes

This worked example is based on a famous early Causality study, "Evaluating the Econometric Evaluations of Training Programs with Experimental Data" by RJ Lalonde (1986). The study examines whether a training program increased participants' wages, given various confounding factors. But in this instance we will use the tutorial to show how you can explore Counterfactual Outcomes using CausalWizard. This means we can answer questions about what would happen if the Treatment was applied to various subsets of participants - the Controls, the Treated, all participants, etc.

This tutorial also shows you how to change variable data-type from Numerical to Categorical, and how to define Control and Treated sample groups given Numerical and Categorical Treatment variables.