powered by
Computes the mutual information (MI) between an outcome `y` and a predictor `x`, using the standard definition: $$MI(X, Y) = H(X) + H(Y) - H(X, Y),$$
mi(y, x)
A numeric scalar giving the mutual information between `x` and `y`
Outcome vector (binary: 0/1 or logical).
Predictor vector (binary: 0/1 or logical). Must be the same length as `y`.
mi(misimdata$y,misimdata$x1)
Run the code above in your browser using DataLab