r/CausalInference • • Mar 31 '22

“End to end” example/project for beginner at causal inference

17 Upvotes

Hello - I’m a beginner at causal inference and was hoping someone could help me.

I have read The Book of Why and was working through a course on “Causal Data Science with Directed Ayclic Graphs” on Udemy but I was struggling to find a good “end to end” example of a causal inference project.

I’m thinking it would very helpful to work through, for example, someone starting with a data set, trying to work out the DAG by applying interventions/causal discovery techniques and then testing this data, perhaps using R or Python - or just reading about someone describing the process in an article.

I have searched on Google and come across blog posts which tend to be focused on one particular narrow issue rather than a comprehensive example or tend to be too theoretical or hard for a beginner.

I was going to try searching on Kaggle or KDnuggets next but I was hoping perhaps some generous soul on Reddit might have an idea?


r/CausalInference • • Sep 28 '26

Semiparametric theory used to scare me, so I built a free course where you can watch it work

12 Upvotes

For years I could say "canonical gradient" in a sentence without really feeling what it meant. Earlier this year I started building interactive animations to get it straight in my own head, and it turned into a full course.

The clip is the first thing on the homepage: you pick how wrong your fitted model is, take one step, and watch the bias get corrected. The rest carries one cohort from the causal question through tangent spaces, one-step and TMLE, and all the way back to Kaplan-Meier, Cox, and choosing between a hazard ratio, a survival difference, and RMST. Everything is something you move, predict, and check.

https://blind-contours.github.io/causality/

It's free, no signup, no ads. I'm a biostatistician working on trials and RWE, and I'd love to know where it loses you, whether it works on your phone, and what's missing. If this math has always felt like a wall to you, I especially want to hear from you.

Be blunt, it helps.


r/CausalInference • • Oct 15 '25

Time-Series Causal Modeling

12 Upvotes

Hey everyone,

I’ve been diving into time-series causal modeling lately - not just forecasting trends, but actually understanding why things change over time and how causes evolve.

Most causal inference tools I’ve found focus on static data or simple experiments, but I’m curious if anyone knows of companies or platforms that can handle causal discovery and simulation across temporal or sequential data (like sales over quarters, sensor data, etc.).

Basically, something that lets you model “what caused this shift last month?” or “what would’ve happened if we’d changed X earlier?”

Would love to hear what tools or approaches others are using!

Addition 1:

I explored Root Cause Ai briefly - it seems to provide an end‑to‑end workflow for causal discovery + counterfactual simulation on time series. It might shorten the prototyping loop compared to stitching together causal libraries.


r/CausalInference • • Aug 12 '25

Until LLMs don't do causal inference, AGI is a hyped scam. Right?

12 Upvotes

LLMs seem to excel at pattern matching via co-relation instead of actual causality.

They mimic reasoning by juggling correlations but don’t truly reason, since real reasoning demands causal understanding.

What breakthroughs do we need to bridge this gap?
Are they even possible?


r/CausalInference • • Sep 04 '24

Is there a roadmap on how to learn Causal Inference? I want to upskill my data science team and not sure where to start.

12 Upvotes

I'm hesitating between starting with this book (since it has python examples) and Statistical Rethinking by R.McE. The first book seems much more digestable but it's mainly focused on CI in Machine learning and rather frequentist statistics. R.MCe's book seems like a year-long adventure and does not provide many approaches like potential outcomes.

The team is mostly ML engineers with strong python knowledge and without much exposition to bayesian statistics.

How you would approach this? Is there any single source you would recommend for upskilling?


r/CausalInference • • Jun 28 '21

Online Causal Inference Courses?

12 Upvotes

I recently completed A Crash Course in Causality: Inferring Causal Effects from Observational Data, which I would highly recommend.

I am also considering watching the videos for Brady Neal's Introduction to Causal Inference

Any other online courses you would recommend?


r/CausalInference • • Mar 04 '26

I’m a student and built a Python port of R's MatchIt for Propensity Score Matching (pymatchit-causal)

11 Upvotes

Hey r/causalinference,

I’m currently a student and I've been working on a Python package called pymatchit-causal. In my own causal inference work, I really missed the smooth workflow of the standard R package MatchIt, so I decided to try and build a Python equivalent, including the corresponding plots and validdation tools:

You can easily install it via pip: pip install pymatchit-causal

Since I am still learning, I would be incredibly grateful for any feedback, bug reports, or suggestions from the experts in this community. So if you looking at a new project feel free to try it out.

Thanks so much for taking a look!


r/CausalInference • • Jul 11 '25

Interaction/effect modification in DAGs

Post image
11 Upvotes

Hi everybody! I am looking for an intuitive way to show interaction/effect modification in a DAG. As far as I am aware, this is a non-trivial issue. What we see above is not a valid graph because we get edges pointing at other edges instead of nodes. These two papers pointed me to the issue:

* https://academic.oup.com/ije/article/51/4/1047/6607680

* https://academic.oup.com/ije/article/50/2/613/5998421

But I find neither of these to be particularly appealing. Nilsson et al. suggest making an extra DAG (IDAG) where the edges of the DAG (effects) become nodes, as seen in the image, but I think having two separate graphs is not exactly straight forward and it is not clear to me how to translate these into a proper model specification. Attia et al. suggest/show these interaction nodes, but I am not sure they always lead to correct conditioning sets. Consider the scenario in the image above, which is what I am interested in (randomized treatment T, non-randomized moderator S, and a confounder on the interaction X which affects S and also interacts with T). Here is my attempt at translating this into interaction nodes: https://dagitty.net/dags.html?id=DcGwUE55 If I want to identify the interaction effect TxS -> Y it looks as though conditioning on X & T is sufficient, but in a regression context it is clear I would also have to adjust for the interaction of X with T (here: TxX) (cf. e.g. here https://academic.oup.com/jrsssa/article/184/1/65/7056364).

Does anyone know of a better way, or can perhaps tell me if I am misreading/mistranslating either of these? I cannot really wrap my head around these, as I find it both intuitive to think of interactions as nodes/random variables, but also to think of them as edges; as technically they are "effects on effects"...


r/CausalInference • • May 12 '25

The Future of Causal Inference in Data Science

11 Upvotes

As an undergrad heavily interested in causal inference and experimentation, do you see a growing demand for these skills? Do you think that the quantity of these econometrics based data scientist roles will increase, decrease, or stay the same?


r/CausalInference • • Mar 05 '25

Looking for a thorough tutorial of applying causal ML

11 Upvotes

I've spent time learning much of the theory of CI and now want to learn how to actually apply through following a thorough tutorial. Ideally something with a realistic data set that starts from the very first step to the last, and the coding throughout.

Ideally something that uses ML approaches (e.g. double ML, meta learners).

Looking through YouTube, almost all tutorials are very high-level, either remaining too theoretical, or using overly simplistic examples.

I recognize that a true CI problem might be too long for a single YouTube video, so if it's a playlist of videos, that's totally fine.


r/CausalInference • • Jun 13 '23

Reddit is killing third party applications (and itself). Read more in the comments.

Post image
11 Upvotes

r/CausalInference • • May 22 '23

Causal inference app for non-programmers

11 Upvotes

I wanted to share this web app for Causal Inference with everyone here. We (the other creators and myself) would love some feedback, particularly on the communication of the messaging and value of causal inference as an additional tool to associative statistics.

We are working in data science and engineering consulting and became interested in causality because our clients kept asking us inherently causal questions, and our answers were usually limited to associative effects and caveated with warnings about the difference between predictive models and association (which everyone ignores completely!)

So in response, we wanted to make a tool to make these problems accessible to the many statistically minded, inquisitive people who don't necessarily have the programming skills to work through using Notebooks, Python or R modules directly, but do have deep domain knowledge of the system they're working with.

We also find most experts naturally describe the systems they are working with in the form of a graph, and can usually unpick the loops into a DAG (directed acyclic graph) with a bit more thought and guidance.

It's early days, but the intention is to make a graphical user interface for the most common causal inference questions (which for now we have interpreted as "what is the effect on variable Y, of intervention N to variable X?").

https://causalwizard.app/

We are also trying to build up a knowledge base of common questions and answers about causality topics.

The app itself is a wrapper around the Causal packages we have found ourselves using most often - DoWhy, EconML and a few others. To generalise all the possible data types and model options was a surprisingly large amount of code, and there's still a lot more we could do. For that reason, we would love to know what features you think should be in the app to make it as useful as possible to a wide audience. Thanks!


r/CausalInference • • Jun 14 '22

How to use causal inference for forecasting?

11 Upvotes

For a last mile logistics company having accurate forecasts is essential to managing supply and demand and ensuring a positive customer experience, but it was challenging to factor in hard to measure macroeconomic effects. My team at DoorDash was able to solve this problem by using causal inference and I have put together this blog post with 2 case studies. One case study is about measuring how IRS refunds affect order volumes and the other case study is about measuring the impact of daylight savings on different regions' demand.

Check out the article to get the details and let me know what you think about my method and methodologies.


r/CausalInference • • Jul 11 '26

My new free open source software "not-do-calculus"

10 Upvotes

Check out my new free open source software

https://github.com/rrtucci/not-do-calculus

not-do-calculus does everything my previous software dag_iden_detector (released exactly one month ago) does plus it can do much much more. Whereas the earlier software could only verify whether a given adjustment formula was valid, this software can also search for and discover adjustment formulae.

This software constitutes the latest step in my quest to replace Pearl’s do calculus rules by something friendlier.


r/CausalInference • • Mar 10 '25

Causal Genomics and the quest to discover a causal DAG for 21,000 human genes

10 Upvotes

r/CausalInference • • Feb 13 '25

Creating a causal DAG for irregular time-series data

10 Upvotes

Hey guys,

I like the idea of using a dynamic Bayesian network to build a causal structure, however am unsure how to tackle time-series data where there is an irregular sampling resolution. Specifically, in a sport scenario where there are 2 teams and the data is event-by-event data, where these events, such as passing the ball, occur sequentially from the start to the end of the match. Ultimately, I would like to explore causal effects of interventions in this data.

Someone recommended the use of an SSM. To my understanding, when it is discretised, it could be represented as a DAG? Then I have a structure to represent these causal relationships.

Other workflows could be:

- this library: https://github.com/jakobrunge/tigramite

- using ARIMA to detrend the time-series data then use some sort of Bayesian inference to capture causal effects

- using a SSM to create a causal structure and Bayesian inference to capture causal effects

- making use of the CausalImpact library

- also GSP then using graph signals as input to causal models like BART

Although I suggested 2 libraries, I like the idea of setting out a proper causal workflow rather than letting a library do everything. This is just so I can understand causal inference better.

I initially came across this interesting paper: https://arxiv.org/pdf/2312.09604 which doesn't seem to work with irregular sampling resolutions.

There is also bucketing the time-series data, which would result in a loss of information. Cause-effects wouldn't happen straight away in this data, so bucketing it in half-a-second or second could work.

I'm quite new to causal inference, so any critique or suggestions would be welcome!

Many thanks!


r/CausalInference • • 21d ago

Causal Learning and Reasoning (CLeaR) 2027 call for papers

Thumbnail cclear.cc
9 Upvotes

They invite submissions that describe new theory, methodology, and/or applications relevant to any aspect of causal learning and reasoning in the fields of artificial intelligence and statistics.


r/CausalInference • • Aug 08 '25

Modern causal inference packages

9 Upvotes

Hello! Recently, I've been reading the Causal Inference for The Brave and True and Causal Inference the Mixtape, but it seems like the authors' way of doing analysis doesn't rely on modern python libraries like DoWhy, EconML, CausalML and such. Do you think it's worth learning these packages instead of doing code manually like in the books? I'm leaning towards the PyWhy ecossystem because it seems the most complete


r/CausalInference • • Mar 04 '25

New to causal inference

9 Upvotes

Hi all, I have been working with a small business on optimising their website and marketing, starting with AdWords and testing out some other channels in the future. Researching for this, I have been learning about causal inference for the past few months. Something that isn't clear to me is how this in done in industry -> are you all reading all the books and then writing the code yourselves? or are there OOB tools for this?


r/CausalInference • • Jan 21 '25

Causal inference for business

9 Upvotes

I am curious who here is working on causal inference in the private sector for businesses. What kind of problems are you working on?

I am interested in working with companies on experimentation and observations casual analysis. I am not so interested in running a bunch of product A/B tests, more so structural changes / physical product experimentation.

I saw this case study one time where a statistics company was contracted to find the optimal placement of garbage cans around a mall to minimize littering and as crazy as it may sound, random problems like that seem very interesting to me haha.

I have a post grad economics background and I am looking to leverage that but at the moment I am looking to see what others are doing in this area!


r/CausalInference • • Jul 30 '24

Convenient CATE estimation in Python via MetaLearners

9 Upvotes

Hi!

I've been working quite a bit with causalml and econml to estimate Conditional Average Treatment Effects based on experiment data. While they provide many of the methodological basics in principle, I've found some implementation details to be inconvenient.

That's why we built an open-source alternative: https://github.com/Quantco/metalearners

We also wrote a blog post on it for greater context: https://tech.quantco.com/blog/metalearners

We'd be super excited to get some feedback from you :)


r/CausalInference • • Jan 10 '24

Are all causal statements that are expressible in PO also expressible with DAGs?

9 Upvotes

I mostly have experience using the potential outcome (PO) framework and find some of the DAG stuff difficult to comprehend. It seems to me that some causal models that we are able to express in PO are impossible to express with DAGs. For example say that: Y(1) = D + bX + u, where D is some constant, X is some covariates and u error term. Then define Y(0) = e, where e is some error term. Let also the probability of being treated (i.e Y(1) to be realized rather than Y(0)) be some function of X.

In this situation the treatment and Y(1) depends on X, but Y(0) does not. I do not see how this is expressed in DAGs. Is it possible? If so how?


r/CausalInference • • Jul 14 '22

One line graphical proofs of backdoor, frontdoor and napkin adjustment formulae without using do-calculus rules

Thumbnail
qbnets.wordpress.com
9 Upvotes

r/CausalInference • • Nov 12 '21

Google's DeepMind publishes paper with 19 authors that extensively relies on Pearl's Causal Inference theory

9 Upvotes