# NOT RUN {
n = 1000
x <- matrix(runif(n * 2), nrow = n)
y <- (x[, 1] + x[, 2]) %% 1
# given x[, 1], y is a function of x[, 2]
codec(y, x[, 2], x[, 1])
# y is a function of x
codec(y, x)
z <- rnorm(n)
# y is a function of x given z
codec(y, x, z)
# y is independent of z given x
codec(y, z, x)
# }
Run the code above in your browser using DataLab