Causality, Causal Inference, Backdoor, Frontdoor, Instrumental Variable.
causal effect of X on Y using different statistical approaches. Here is the relevant code: generate_df <- function(n = 1000, path_weights) { #generate data frame from path_weights a <- path_weights sd_noise = 2 iv <- rnorm(n, sd = sd_noise) bd <- rnorm(n, sd = sd_noise) x <- rnorm(n) + a[1]*iv +