# Generate example data
set.seed(123)
n <- 50
x <- matrix(rnorm(n * 5), nrow = n) # explanatory variables
y <- matrix(rnorm(n), nrow = n) # response variable
z <- matrix(rnorm(n * 2), nrow = n) # conditioning variables
# Compute partial MDD
pmdd(x, y, z)
Run the code above in your browser using DataLab