Causal inference is a branch of scientific inquiry that seeks to understand the relationship between cause and effect. It involves studying the factors that lead to a particular outcome or event and identifying the causal relationships between them. Causal research is often used in fields such as medicine, psychology, and social sciences to identify the causes of various phenomena and to develop interventions that can effectively address them.
Questions tagged [causality]
136 questions
22
votes
3 answers
Understanding output from statsmodels grangercausalitytests
I'm new to Granger Causality and would appreciate any advice on understanding/interpreting the results of the python statsmodels output. I've constructed two data sets (sine functions shifted in time with noise added)
and put them in a "data" matrix…

Wilhelm
- 363
- 1
- 2
- 7
17
votes
4 answers
What is the difference between causal models and directed graphical models?
What is the difference between causal models and directed graphical models? What is the difference between causal relationships and directed probabilistic relationships? More concretely, what would you put in the interface of a…

Neil G
- 32,138
- 39
- 156
- 257
16
votes
3 answers
Why is this behavior allowed in the Java Memory Model?
Causality in JMM seems to be the most confusing part of it. I have a few questions regarding JMM causality, and allowed behaviors in concurrent programs.
As I understand, the current JMM always prohibits causality loops. (Am I right?)
Now, as per…

gaganbm
- 2,663
- 3
- 24
- 36
8
votes
0 answers
CausalImpact package in R doesn't work for Poisson bsts model
I'd like to use the CausalImpact package in R to estimate the impact of an intervention on infectious disease case counts. We typically characterize the distributions of case counts as either Poisson or negative binomial. The bsts() function allows…

salauer
- 81
- 2
3
votes
1 answer
Error when Identifying Effects of Causal Model
I am trying to use the CausalModel and Econml libraries in order to determine the effect of a variable on different scenarios displayed in the dataset below :
So firstly, I import the following libraries :
import pandas as pd
import econml
import…

Dylan Ndengu
- 43
- 7
3
votes
2 answers
Path diagram in r
I am trying to plot a path diagram of a Structural Equation Model(SEM) in R. I was able to plot it using semPlot::semPaths(). The output is similar to The SEM was modeled using lavaan package.
I want a plot similar to . with estimates and p values.…

Stat009
- 45
- 1
- 5
3
votes
1 answer
Is there anything equivalent to MVGC toolbox(from MATLAB) in python?
I want to use Multivariate Granger Causality in python. I found that there is MVGC toolbox in MATLAB but was unable to find its equivalent in python or rather was unable to find any implementations of Multivariate Granger Causality in python. Please…

Sushodhan
- 400
- 1
- 6
- 16
3
votes
2 answers
Column wise granger's causal tests in R
I have 2 matrices of different parameters: M1and M3 with the same dimensions. I'll like to do a column wise grangertest in R.
M1<- matrix( c(2,3, 1, 4, 3, 3, 1,1, 5, 7), nrow=5, ncol=2)
M3<- matrix( c(1, 3, 1,5, 7,3, 1, 3, 3, 4), nrow=5,…

Joke O.
- 515
- 6
- 29
3
votes
1 answer
Vector Autoregression with Python Statsmodels
I am trying to implement multidimensional Granger causality in python. For that matter I am using Vector Autoregression from Statsmodels, but when I try to get coeffcients out of it, it returns me an empty matrix. Can somebody tell me what is wrong…

Cupitor
- 11,007
- 19
- 65
- 91
3
votes
1 answer
Domain events causal dependency with Event Sourcing and CQRS
Let's say we have a write model (domain) that generates two events:
CarrierAdded(...)
BusConnectionCreated(carrier, ...)
Carrier and BusConnection classes are (part of) separate aggregates. BusConnection is assigned to a Carrier and contains its…

Mequrel
- 727
- 6
- 12
2
votes
1 answer
What should I look for in the analysis of the attached signals?
I'm looking to analyze and compare the following `signals':
(Edit: better renderings here: oscillations good and here: oscillations bad)
What you see are plots of neuron activations from a type of artificial neural network plotted against time.…

Ben J
- 1,367
- 2
- 15
- 33
2
votes
0 answers
predict conditional mean of one potential outcome in causal forest?
I fit a causal_forest() and used predict() to get estimates of tau(X) = E[Y(1) - Y(0) | X].
How can I get estimates of E[Y(0) | X] alone ?
Thank you !

Shira
- 119
- 5
2
votes
1 answer
Causal Inference where the treatment assignment is randomised
I have mostly worked with Observational data where the treatment assignment was not randomized. In the past, I have used PSM, IPTW to balance and then calculate ATE.
My problem is:
Now I am working on a problem where the treatment assignment is…

manish Prasad
- 636
- 6
- 16
2
votes
1 answer
System design question - ordered message delivery in a messaging app
I'm doing system design interview prep and was practicing with a "designing WhatsApp" question. One of the things I'm still unclear on is how a system like WhatsApp maintains order in message delivery. I'll give my high-level understanding:
Message…

rbapq
- 21
- 1
- 3
2
votes
0 answers
Bootstrapping Time to Event Models for Standard Errors Following weighting propensity score R
Working with time to event data and am weighting cases by the propensity score. I want to examine how methods of variance estimation affect the HR in a cox proportional hazards model. This is the code so…

tentitan
- 63
- 3