2
$\begingroup$

In the book 'Elements of causal inference', the code below is used an example for structure identification.

library(dHSIC)
library(mgcv)
X <- rnorm(200)
Y <- X^3 + rnorm(200)
modelforw <- gam(Y ~ s(X))
modelbackw <- gam(X ~ s(Y))
dhsic.test(modelforw$residuals, X)$p.value
dhsic.test(modelbackw$residuals, Y)$p.value

The example is clear, but my doubt is, why is he using an independence test and not a normality test? Given that the data is normal, wouldn't it be easier to test for that?

$\endgroup$
1
  • $\begingroup$ You could explain in a bit more detail what is going on in the code? $\endgroup$ Commented Jun 6, 2020 at 15:59

1 Answer 1

-1
$\begingroup$

The answer is in section 4.2.1 Additive Noise Models, here's an excerpt:

enter image description here

In this method they only need to check the independence of residuals from $x\sim y$ and $y\sim x$ models from $y$ and $x$ to see whether there is an asymmetry, which tells them whether there is causality

$\endgroup$
2
  • $\begingroup$ Sounds very reasonable, but how is this related to structure identification? Do you understand what the OP is doing? (I do not.) $\endgroup$ Commented Jun 6, 2020 at 16:59
  • 1
    $\begingroup$ @RichardHardy no idea $\endgroup$
    – Aksakal
    Commented Jun 6, 2020 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.