To generate the data, run the following:set.seed(1) X = rnorm(100) M = 0.6*X + rnorm(100) Y = 0.8*M + rnorm(100)data = data.frame(X,M,Y)