Questions tagged [causality]

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.

136 questions
2
votes
1 answer

Why does using Causalities in CCR result in memory leaks?

Does anyone have information about using Causalities? I have tried unsuccessfully to use these on my project as they appeared to be causing massive memory loads. Is this unusual? Beyond the normal (aka overly simple) examples given in the…
Andrew Harry
  • 13,773
  • 18
  • 67
  • 102
2
votes
0 answers

Granger Causality with Panel VAR package in R

I have been estimating a panel VAR model via GMM (Generalized Method of Moments) over ~20k observations with the panelvar R package by Sigmund and Ferstl. However, I was surprised that there is no function provided to test for granger causality. Is…
Simon Stolz
  • 207
  • 2
  • 7
2
votes
1 answer

CausalImpact: defining seasonal data parameters

I am trying to figure out how to use the Python port of CausalImpact package. In the examples notebook, there is a section on working with seasonal data. It is still unclear to me how to define the nseasons parameter. In the notebook example: ci =…
Korean_Of_the_Mountain
  • 1,428
  • 3
  • 16
  • 40
2
votes
1 answer

How to draw regression discontinuity plot with confidence intervals using rdplot?

For example, suppose I want to draw RDD plot with confidence intervals (eg., upper and lower longdash lines) using the data below. How should I proceed? x<-runif(1000,-1,1) y<-5+3*x+2*(x>=0)+rnorm(1000) rdplot(y,x) The documentation…
Krantz
  • 1,424
  • 1
  • 12
  • 31
2
votes
0 answers

Structural Equation Model with Linear Dependency (Lavaan)

I want to estimate a structural equation model using lavaan in R with a categorical mediator. A wrinkle is that three of the exogenous variables are linearly dependent. However, this shouldn't be a problem since I'm using the categorical mediator to…
2
votes
1 answer

Granger causality ordering variable

I am trying to compute Granger causality from a VAR using vars package. I know that order of variable is important in a VAR to compute IRF, but here I have different result for Granger causality. Here is a reproducible example: test…
thibaultbl
  • 886
  • 1
  • 10
  • 20
1
vote
0 answers

Casual inference between a multi-dimensional time series and univariate time series (in python)

Trying to produce a causal relationships between data sources (e.g. A -> (cause) B), I could find a lot of sources for casual inference between univariate signals (e.g. temperature and speed). Nevertheless, I have hard time to find a way to test if…
Α Πι
  • 11
  • 2
1
vote
1 answer

Metric to see how close two Rankings are

I am trying to confirm a survey's benchmark on causal discovery methods, and I am running the same methods on the same datasets, evaluated on the same metrics. To compare them, I'd like to use a metric that takes as input both rankings (order of…
1
vote
1 answer

Trying to run a Granger Causality test

I have my dataset, it looks something like this I then use my r code install.packages("vars") library(vars) install.packages("plm") library(plm) install.packages("panelvar") library(panelvar) data <- read.csv("economistdata.csv") data$year <-…
minddrag
  • 11
  • 2
1
vote
0 answers

Diff-in-diff with repeated cross-sectional data in R

I’m using difference-in-differences design to estimate the impact of policy reform on depression prevalence using administrative data. My unit of analysis is a student who is age 18, enrolled to different types of higher education (Type A and B).…
n61
  • 11
  • 3
1
vote
1 answer

How to export DAG in .gml format from Dagitty and input into dowhy?

I have just started exploring dowhy library for causal inference. In the user guide section there is a basic example to calculate the causal effect. A section here says that it is recommended to input the causal graph in GML graph format. The causal…
Anirban Chakraborty
  • 539
  • 1
  • 5
  • 15
1
vote
0 answers

how can we tell dagitty in R to not include a latent variable in the set of all the adjustment sets?

I am using dagitty package in R. I have a DAG as follows where U is latent: library(dagitty) dag <- dagitty(" dag { U [latent] U -> Z1 Z1 -> Z2 Z2 -> Y U -> X X -> Y } ") When I call the adjustmentSets(x = dag, exposure = "X", outcome = "Y" , type…
Sara
  • 11
  • 3
1
vote
1 answer

Simulate effect of confounder on two random variables

I want to generate some data in order to show partial correlation to control for a confounder. Specifically, I want to generate data about two uncorrelated random variables (let's say speech and memory) and use a third variable to influence them…
Dario Lacan
  • 1,099
  • 1
  • 11
  • 25
1
vote
1 answer

Three Dimensional Panel Data: Granger Causality Test in R

I have data which is structured the following: As you can see, I have "multi-dimensional panel data", i.e. I do not only have years and countries, but also industries as a third "index". I did a panel regression analysis with the fixest package to…
Dom Slenk
  • 29
  • 2
1
vote
0 answers

Exercises on directed acyclic graphs and appropriate controls

I have recently started my first steps in causal inference and looking to practice further. Is anyone aware of any good resource that provides examples of directed acyclic graphs and the appropriate regression models for each?
Gnik
  • 11
  • 2
1
2
3
8 9