2 ms·
It is sort of tautological: # variable A has three causes: C1,C2,C3 C1 <- rnorm(100) C2 <- rnorm(100) C3 <- rnorm(100) A <- ifelse(C1 + C2
by elsherbini 2y ago
It is sort of tautological:
# variable A has three causes: C1,C2,C3
C1 <- rnorm(100)
C2 <- rnorm(100)
C3 <- rnorm(100)
A <- ifelse(C1 + C2 + C3 > 1, 1, 0)
cor(A, C1)
cor(A, C2)
cor(A, C3)
# If we set the values of A ourselves...
A <- sample(c(1,0), 100, replace=TRUE)
# then A no longer has correlation with its natural causes
cor(A, C1)
cor(A, C2)
cor(A, C3)